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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sfun_str.c

?? 內(nèi)涵大量基于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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天av天天翘天天综合网| 欧美国产欧美综合| 中文字幕在线免费不卡| 青青国产91久久久久久| 成人激情免费视频| 精品国产欧美一区二区| 亚洲一区二区三区在线播放| 丁香婷婷综合五月| 日韩欧美123| 日日摸夜夜添夜夜添国产精品| 99久久精品一区| 久久久久一区二区三区四区| 日本va欧美va精品| 在线看不卡av| 亚洲欧美一区二区三区极速播放| 精品综合免费视频观看| 欧美日韩精品二区第二页| 国产精品久久久久久亚洲毛片 | 欧美一级xxx| 一区二区三区欧美视频| 东方aⅴ免费观看久久av| 日韩欧美一级精品久久| 日本欧美一区二区三区乱码| 欧美在线免费观看亚洲| 亚洲欧洲美洲综合色网| 成人涩涩免费视频| 国产香蕉久久精品综合网| 精东粉嫩av免费一区二区三区| 欧美二区三区91| 午夜免费欧美电影| 欧美日韩国产美女| 亚洲国产一区二区视频| 欧美专区在线观看一区| 亚洲精品国产a| 91精品91久久久中77777| ...中文天堂在线一区| 成人一道本在线| 国产精品久久看| 成人精品国产免费网站| 国产精品久久久久一区二区三区 | 国产suv一区二区三区88区| 欧美精品一区二区三区视频| 久久精品国产网站| 精品免费99久久| 国产一区二区视频在线播放| 久久综合色婷婷| 国产在线精品免费| xf在线a精品一区二区视频网站| 日韩在线a电影| 欧美一区二区三区喷汁尤物| 亚洲超丰满肉感bbw| 91精品国产综合久久久久| 亚洲第四色夜色| 欧美精品v国产精品v日韩精品 | 国产精品一线二线三线| 2019国产精品| 国产福利一区二区三区在线视频| 国产欧美一区二区在线观看| 国产精品小仙女| 中文在线资源观看网站视频免费不卡 | 精品欧美一区二区三区精品久久| 久久99精品久久久久久久久久久久 | 亚洲国产精品麻豆| 91麻豆精品91久久久久同性| 天堂一区二区在线| 精品国产伦理网| 国产精品亚洲视频| 亚洲欧洲中文日韩久久av乱码| 日本精品裸体写真集在线观看 | 中文字幕 久热精品 视频在线 | 美女被吸乳得到大胸91| 久久精品水蜜桃av综合天堂| 国产福利91精品一区二区三区| 中文字幕一区二区三区视频 | 国产精品欧美极品| 99v久久综合狠狠综合久久| 亚洲第一主播视频| 欧美一二三在线| 国产suv一区二区三区88区| 中文字幕日本不卡| 在线不卡欧美精品一区二区三区| 久久国产精品99久久久久久老狼| 久久久久久久久伊人| 成人午夜精品在线| 中文字幕中文乱码欧美一区二区| 欧美亚洲综合色| 美女国产一区二区| 综合电影一区二区三区| 欧美伊人精品成人久久综合97 | 亚洲午夜在线观看视频在线| 91麻豆精品久久久久蜜臀| 韩国女主播成人在线| 一区二区三区中文免费| 51午夜精品国产| 成人一区二区三区在线观看 | 日韩视频免费观看高清在线视频| 福利一区二区在线| 亚洲国产日韩一级| 久久免费视频一区| 日本韩国一区二区三区视频| 精品一区二区三区免费| 国产精品成人一区二区艾草| 欧美一区二区国产| www.一区二区| 美女网站视频久久| 亚洲欧洲成人精品av97| 欧美大白屁股肥臀xxxxxx| caoporen国产精品视频| 麻豆精品久久精品色综合| 亚洲欧洲色图综合| 精品国产免费人成在线观看| 色综合久久66| 国产精品一二三四区| 亚洲午夜久久久| 中文字幕免费不卡| 欧美一区2区视频在线观看| 成人一级黄色片| 老鸭窝一区二区久久精品| 亚洲精品一二三区| 国产清纯白嫩初高生在线观看91| 9191精品国产综合久久久久久 | 亚洲主播在线观看| 国产三级一区二区三区| 欧美日韩国产中文| 91视频免费看| 久久国产欧美日韩精品| 亚洲欧美日韩国产综合在线| 国产日韩精品一区| 欧美中文一区二区三区| 99精品视频在线免费观看| 亚洲伦理在线精品| 中文在线资源观看网站视频免费不卡| 日韩欧美亚洲国产另类| 欧美在线观看一二区| 懂色av一区二区在线播放| 久久精品国产精品亚洲红杏| 国产精品乱码一区二三区小蝌蚪| 日韩无一区二区| 欧美伦理电影网| 91麻豆国产在线观看| 成人av资源网站| 国产精品亚洲专一区二区三区| 久久精品国产一区二区三| 亚洲v日本v欧美v久久精品| 一级中文字幕一区二区| 国产精品久久网站| 国产精品伦一区| 国产视频一区二区在线观看| wwwwxxxxx欧美| 欧美蜜桃一区二区三区| 欧美色涩在线第一页| 国产一区二区三区视频在线播放| 久久99日本精品| 日韩激情一二三区| 五月激情六月综合| 亚洲va在线va天堂| 一区二区三区毛片| 亚洲国产美女搞黄色| 一区二区三区在线观看视频| 亚洲乱码日产精品bd| √…a在线天堂一区| 亚洲精品第一国产综合野| **网站欧美大片在线观看| 亚洲欧洲精品成人久久奇米网| 国产精品伦理一区二区| 日韩一区在线播放| 亚洲欧美综合色| 樱桃视频在线观看一区| 亚洲乱码国产乱码精品精可以看| 亚洲永久精品国产| 国产精品天美传媒| 国产精品伦一区二区三级视频| 久久久国产综合精品女国产盗摄| 欧美草草影院在线视频| 久久久综合精品| 国产午夜精品一区二区| 国产精品久久久久久福利一牛影视| 欧美激情一区不卡| 亚洲色图在线播放| 一区二区三区精品久久久| 日日摸夜夜添夜夜添精品视频| 日韩av中文字幕一区二区三区| 六月丁香综合在线视频| 国内偷窥港台综合视频在线播放| 国产精品一二二区| 成人av电影在线| 欧美精品自拍偷拍动漫精品| 成熟亚洲日本毛茸茸凸凹| 色国产综合视频| 欧美一区二区久久久| 欧美tickling挠脚心丨vk| 国产欧美日韩中文久久| 国产精品亲子伦对白| 一区二区三区**美女毛片| 亚洲国产精品一区二区久久| 久久精品噜噜噜成人av农村| 国产成人啪午夜精品网站男同| 91欧美激情一区二区三区成人| 欧美日韩综合色| 精品少妇一区二区三区日产乱码 |