亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sfun_str.c

?? 在matlab中
?? C
字號:

/*
 * sfuntmpl_basic.c: Basic 'C' template for a level 2 S-function.
 *
 *  -------------------------------------------------------------------------
 *  | See matlabroot/simulink/src/sfuntmpl_doc.c for a more detailed template |
 *  -------------------------------------------------------------------------
 *
 * Copyright 1990-2001 The MathWorks, Inc.
 * $Revision: 1.26 $
 */


/*
 * You must specify the S_FUNCTION_NAME as the name of your S-function
 * (i.e. replace sfuntmpl_basic with the name of your S-function).
 */

#define S_FUNCTION_NAME  sfun_str
#define S_FUNCTION_LEVEL 2

/*
 * Need to include simstruc.h for the definition of the SimStruct and
 * its associated macro definitions.
 */
#include "simstruc.h"
#include "math.h"

/* Error handling
 * --------------
 *
 * You should use the following technique to report errors encountered within
 * an S-function:
 *
 *       ssSetErrorStatus(S,"Error encountered due to ...");
 *       return;
 *
 * Note that the 2nd argument to ssSetErrorStatus must be persistent memory.
 * It cannot be a local variable. For example the following will cause
 * unpredictable errors:
 *
 *      mdlOutputs()
 *      {
 *         char msg[256];         {ILLEGAL: to fix use "static char msg[256];"}
 *         sprintf(msg,"Error due to %s", string);
 *         ssSetErrorStatus(S,msg);
 *         return;
 *      }
 *
 * See matlabroot/simulink/src/sfuntmpl_doc.c for more details.
 */

/*====================*
 * S-function methods *
 *====================*/

/* Function: mdlInitializeSizes ===============================================
 * Abstract:
 *    The sizes information is used by Simulink to determine the S-function
 *    block's characteristics (number of inputs, outputs, states, etc.).
 */
static void mdlInitializeSizes(SimStruct *S)
{
    /* See sfuntmpl_doc.c for more details on the macros below */

    ssSetNumSFcnParams(S, 0);  /* number of extra parameters */
    if (ssGetNumSFcnParams(S) != ssGetSFcnParamsCount(S)) {
        /* Return if number of expected != number of actual parameters */
        return;
    }

    ssSetNumContStates(S, 0);
    ssSetNumDiscStates(S, 0);

    if (!ssSetNumInputPorts(S, 1)) return;
    ssSetInputPortWidth(S, 0, 3);
    ssSetInputPortRequiredContiguous(S, 0, true); /*direct input signal access*/
    /*
     * Set direct feedthrough flag (1=yes, 0=no).
     * A port has direct feedthrough if the input is used in either
     * the mdlOutputs or mdlGetTimeOfNextVarHit functions.
     * See matlabroot/simulink/src/sfuntmpl_directfeed.txt.
     */
    ssSetInputPortDirectFeedThrough(S, 0, 1);

    if (!ssSetNumOutputPorts(S, 1)) return;
    ssSetOutputPortWidth(S, 0, 1);

    ssSetNumSampleTimes(S, 1);
    ssSetNumRWork(S, 0);
    ssSetNumIWork(S, 0);
    ssSetNumPWork(S, 0);
    ssSetNumModes(S, 0);
    ssSetNumNonsampledZCs(S, 0);

    ssSetOptions(S, 0);
}

/* Function: mdlInitializeSampleTimes =========================================
 * Abstract:
 *    This function is used to specify the sample time(s) for your
 *    S-function. You must register the same number of sample times as
 *    specified in ssSetNumSampleTimes.
 */
static void mdlInitializeSampleTimes(SimStruct *S)
{
    ssSetSampleTime(S, 0, *mxGetPr(ssGetSFcnParam(S,2)));
    ssSetOffsetTime(S, 0, 0.0);
}

#define MDL_INITIALIZE_CONDITIONS   /* Change to #undef to remove function */
#if defined(MDL_INITIALIZE_CONDITIONS)
  /* Function: mdlInitializeConditions ========================================
   * Abstract:
   *    In this function, you should initialize the continuous and discrete
   *    states for your S-function block.  The initial states are placed
   *    in the state vector, ssGetContStates(S) or ssGetRealDiscStates(S).
   *    You can also perform any other initialization activities that your
   *    S-function may require. Note, this routine will be called at the
   *    start of simulation and if it is present in an enabled subsystem
   *    configured to reset states, it will be call when the enabled subsystem
   *    restarts execution to reset the states.
   */
  static void mdlInitializeConditions(SimStruct *S)
  {
  }
#endif /* MDL_INITIALIZE_CONDITIONS */

#define MDL_START  /* Change to #undef to remove function */
#if defined(MDL_START) 
  /* Function: mdlStart =======================================================
   * Abstract:
   *    This function is called once at start of model execution. If you
   *    have states that should be initialized once, this is the place
   *    to do it.
   */
  static void mdlStart(SimStruct *S)
  {
  }
#endif /*  MDL_START */

/* Function: mdlOutputs =======================================================
 * Abstract:
 *    In this function, you compute the outputs of your S-function
 *    block. Generally outputs are placed in the output vector, ssGetY(S).
 */
static void mdlOutputs(SimStruct *S, int_T tid)
{
    const real_T *u = (const real_T*) ssGetInputPortSignal(S,0);
    real_T       *y = ssGetOutputPortSignal(S,0);
    if (fabs(u[0])>u[2]) y[0]=1;
    elseif (fabs(u[1])<=1e-5) y[0]=0;
}

#define MDL_UPDATE  /* Change to #undef to remove function */
#if defined(MDL_UPDATE)
  /* Function: mdlUpdate ======================================================
   * Abstract:
   *    This function is called once for every major integration time step.
   *    Discrete states are typically updated here, but this function is useful
   *    for performing any tasks that should only take place once per
   *    integration step.
   */
  static void mdlUpdate(SimStruct *S, int_T tid)
  {
  }
#endif /* MDL_UPDATE */

#define MDL_DERIVATIVES  /* Change to #undef to remove function */
#if defined(MDL_DERIVATIVES)
  /* Function: mdlDerivatives =================================================
   * Abstract:
   *    In this function, you compute the S-function block's derivatives.
   *    The derivatives are placed in the derivative vector, ssGetdX(S).
   */
  static void mdlDerivatives(SimStruct *S)
  {
  }
#endif /* MDL_DERIVATIVES */

/* Function: mdlTerminate =====================================================
 * Abstract:
 *    In this function, you should perform any actions that are necessary
 *    at the termination of a simulation.  For example, if memory was
 *    allocated in mdlStart, this is the place to free it.
 */
static void mdlTerminate(SimStruct *S)
{
}

/*======================================================*
 * See sfuntmpl_doc.c for the optional S-function methods *
 *======================================================*/

/*=============================*
 * Required S-function trailer *
 *=============================*/

#ifdef  MATLAB_MEX_FILE    /* Is this file being compiled as a MEX-file? */
#include "simulink.c"      /* MEX-file interface mechanism */
#else
#include "cg_sfun.h"       /* Code generation registration function */
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品日韩一| bt欧美亚洲午夜电影天堂| 国产精品你懂的| 国产午夜精品福利| 欧美一级日韩免费不卡| 精品视频在线免费观看| 欧美日韩你懂得| 欧美日韩国产成人在线免费| 宅男在线国产精品| 久久亚洲欧美国产精品乐播 | 日韩一区二区三区高清免费看看| 欧美色偷偷大香| 日韩欧美视频一区| 国产视频911| 一区二区三区精品视频| 日韩电影在线观看电影| 国产一区二区不卡| 91色porny蝌蚪| 91精品国产麻豆国产自产在线 | 欧美高清在线一区二区| 中文字幕在线一区二区三区| 亚洲愉拍自拍另类高清精品| 五月开心婷婷久久| 国产美女在线精品| 色综合欧美在线| 精品福利一区二区三区免费视频| 日韩女优制服丝袜电影| 久久精品人人爽人人爽| 一区二区三区久久| 麻豆精品一区二区三区| 欧美日韩大陆一区二区| 26uuu另类欧美| 亚洲精品视频自拍| 极品少妇xxxx偷拍精品少妇| 色又黄又爽网站www久久| 日韩久久久久久| 亚洲精品国产第一综合99久久| 免费成人av资源网| 91日韩在线专区| 久久久久久久久久电影| 性做久久久久久免费观看欧美| 国产综合久久久久久鬼色| 欧美专区在线观看一区| 日本一区二区三区免费乱视频| 亚洲成人久久影院| 99国内精品久久| 欧美大片免费久久精品三p| 亚洲男人电影天堂| 国产成人综合亚洲网站| 91精品福利在线一区二区三区| 亚洲视频一二区| 国产精品一区二区在线观看不卡| 91精品国产色综合久久| 亚洲自拍偷拍九九九| 丁香网亚洲国际| 久久综合九色欧美综合狠狠| 午夜精品久久久久久久久久久 | 欧美丰满高潮xxxx喷水动漫| 亚洲色欲色欲www在线观看| 国产一区二区在线观看免费| 日韩亚洲欧美在线观看| 亚洲不卡在线观看| 欧美午夜在线一二页| 日韩伦理免费电影| 99久久精品免费看国产| 国产精品视频看| av在线不卡网| 国产精品美女久久久久久久久久久 | 欧美一区二区视频免费观看| 亚洲国产精品精华液网站| 日本乱码高清不卡字幕| 亚洲欧美另类综合偷拍| 色8久久精品久久久久久蜜| 亚洲精品成人精品456| 色婷婷久久久亚洲一区二区三区 | 中文字幕 久热精品 视频在线| 精品无人码麻豆乱码1区2区| 日韩视频一区二区三区| 麻豆国产精品官网| 久久天堂av综合合色蜜桃网| 国产成人丝袜美腿| **欧美大码日韩| 欧美在线观看视频在线| 亚洲丰满少妇videoshd| 欧美区在线观看| 裸体一区二区三区| 国产色产综合产在线视频| 成人小视频在线| 亚洲激情图片一区| 欧美一级久久久| 国产麻豆视频一区| |精品福利一区二区三区| 欧美日韩色一区| 精品一区二区三区免费视频| 久久综合色之久久综合| 97se亚洲国产综合自在线| 亚洲高清免费一级二级三级| 欧美一级xxx| 国产91丝袜在线播放| 亚洲日本va在线观看| 欧美日韩美少妇| 国产精品主播直播| 伊人开心综合网| 日韩欧美一级片| av不卡免费电影| 日韩制服丝袜av| 国产精品久久99| 4438x成人网最大色成网站| 成人永久aaa| 视频一区中文字幕| 国产精品视频看| 日韩一区二区中文字幕| 97国产一区二区| 久久精品国产一区二区三区免费看 | 2021中文字幕一区亚洲| 在线精品视频小说1| 国产福利视频一区二区三区| 夜夜嗨av一区二区三区| 亚洲国产精品成人综合| 欧美日韩成人激情| 99国内精品久久| 风间由美一区二区三区在线观看 | 亚洲成人av在线电影| 久久精品在这里| 欧美一二三四在线| 欧美日韩国产色站一区二区三区| 国产91丝袜在线播放九色| 老司机免费视频一区二区| 亚洲成人中文在线| 综合色中文字幕| 欧美激情在线看| 精品黑人一区二区三区久久| 欧美疯狂做受xxxx富婆| 在线亚洲人成电影网站色www| 成人免费电影视频| 国产成人av一区| 国产在线精品一区二区三区不卡| 日韩制服丝袜先锋影音| 亚洲大片免费看| 亚洲午夜在线电影| 亚洲一二三专区| 亚洲综合激情另类小说区| 亚洲欧美日韩系列| 亚洲天堂精品视频| 国产精品高潮呻吟| 亚洲欧美日韩成人高清在线一区| 国产精品国产三级国产a| 亚洲欧洲精品一区二区精品久久久 | 午夜精品久久久久| 视频一区在线视频| 蜜臀av性久久久久蜜臀av麻豆| 五月婷婷欧美视频| 天天亚洲美女在线视频| 免费久久99精品国产| 日本伊人色综合网| 久久狠狠亚洲综合| 国产乱码精品一区二区三区五月婷| 韩国三级在线一区| 国产aⅴ综合色| 91啪亚洲精品| 欧美日韩免费观看一区二区三区| 欧美性猛交xxxx乱大交退制版| 在线观看亚洲专区| 5566中文字幕一区二区电影| 日韩午夜小视频| 欧美成人精品高清在线播放| 久久无码av三级| 国产精品久久久久久久裸模| 亚洲蜜臀av乱码久久精品蜜桃| 一区二区高清免费观看影视大全 | 成人精品视频一区| 国内精品久久久久影院薰衣草| 久久99蜜桃精品| 成人精品免费网站| 色婷婷综合五月| 日韩三级精品电影久久久| 久久亚洲精品小早川怜子| 中文字幕一区二区三区在线不卡| 亚洲综合一区二区| 久久国产精品99久久久久久老狼| 国产成人亚洲综合色影视| 在线国产亚洲欧美| 精品少妇一区二区三区日产乱码| 国产精品嫩草影院com| 午夜精品免费在线观看| 国产酒店精品激情| 欧美探花视频资源| 国产午夜一区二区三区| 一区二区三区精品在线观看| 久久99久久99小草精品免视看| 成人小视频免费观看| 欧美日韩一区二区三区四区五区 | www国产精品av| 久久九九久久九九| 国产亚洲福利社区一区| 亚洲国产精品久久一线不卡| 国产69精品一区二区亚洲孕妇| 欧美在线色视频| 日本一区二区三区四区在线视频 | 久久99久久99|