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

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

?? sfun_str.c

?? 大量matlab實(shí)例代碼
?? C
字號(hào):

/*
 * 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

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人一区在线| 2024国产精品| 在线免费观看日韩欧美| 91亚洲永久精品| 91香蕉国产在线观看软件| 成人va在线观看| 99久久免费精品| 一本一本久久a久久精品综合麻豆| www.色综合.com| 成人短视频下载| 91在线精品一区二区三区| 99国产欧美久久久精品| 色综合视频在线观看| 日本精品免费观看高清观看| 26uuu国产一区二区三区| 久久看人人爽人人| 国产精品亲子伦对白| 亚洲欧美在线视频观看| 亚洲电影中文字幕在线观看| 丝袜美腿亚洲色图| 国产在线精品一区二区三区不卡| 福利一区福利二区| 91麻豆国产自产在线观看| 欧美日韩国产经典色站一区二区三区| 欧美精品在线观看播放| 日韩一区二区三区视频在线| 精品国产一区二区精华| 国产婷婷一区二区| 一区二区三区中文字幕精品精品| 亚洲午夜在线视频| 麻豆久久久久久| 国产69精品一区二区亚洲孕妇| 99久久er热在这里只有精品66| 欧美视频中文字幕| 日韩一区二区三区在线视频| 欧美高清在线一区二区| 亚洲综合在线免费观看| 婷婷国产在线综合| 国产一区在线看| 日本丶国产丶欧美色综合| 欧美成人一区二区三区片免费 | 欧美成人女星排名| 国产女人水真多18毛片18精品视频| 中文字幕在线观看不卡视频| 亚洲第一成人在线| 成人性生交大片免费看中文| 欧美精品久久天天躁| 国产日韩欧美一区二区三区综合| 亚洲综合久久久久| 国产一区二区女| 色狠狠桃花综合| 久久一留热品黄| 亚洲午夜免费视频| 国产精品一区二区在线播放 | 国产福利91精品一区| 在线观看av不卡| 国产福利电影一区二区三区| 经典三级视频一区| 丁香婷婷综合激情五月色| 色呦呦网站一区| 精品国产一区二区精华| 亚洲一级二级三级| 国产精品亚洲第一| 国产成人免费视频精品含羞草妖精| 亚洲色图视频免费播放| 亚洲美女免费在线| 成人夜色视频网站在线观看| 国产不卡视频一区二区三区| 高清国产一区二区| 欧美一区二区网站| 亚洲欧美色一区| 国产suv精品一区二区883| 欧美一区二区三区视频| 亚洲国产精品久久人人爱| 成人黄色免费短视频| 精品久久国产97色综合| 五月婷婷综合激情| 在线欧美小视频| 自拍偷拍欧美激情| 欧洲精品视频在线观看| 国产日本欧美一区二区| 七七婷婷婷婷精品国产| 欧美日本一区二区| 亚洲人吸女人奶水| 成人99免费视频| 国产视频不卡一区| 韩国一区二区视频| 日韩精品一区二| 人妖欧美一区二区| 欧美乱熟臀69xxxxxx| 亚洲成av人片| 欧美日韩中文一区| 亚洲最新在线观看| 91成人在线观看喷潮| 亚洲视频一区二区在线| av不卡一区二区三区| 国产精品女主播在线观看| 国产成人一区二区精品非洲| 精品粉嫩超白一线天av| 美女网站在线免费欧美精品| 欧美成人一区二区三区| 卡一卡二国产精品| 精品国产乱码久久久久久牛牛| 日本系列欧美系列| 欧美高清精品3d| 日韩精品五月天| 日韩一区二区三区在线观看 | 国产精品一区二区在线播放| 精品乱人伦小说| 国产精品99久久不卡二区| 精品美女一区二区三区| 久久精品国产亚洲高清剧情介绍| 日韩美女天天操| 精品中文字幕一区二区| 久久免费看少妇高潮| 风间由美一区二区av101 | 国产综合色视频| 久久久久久97三级| 成人高清在线视频| 亚洲精品欧美综合四区| 欧美色图一区二区三区| 午夜久久久久久久久久一区二区| 欧美三级视频在线观看| 免费一级欧美片在线观看| 久久婷婷国产综合国色天香| 成人免费av资源| 亚洲成人你懂的| 久久婷婷国产综合国色天香| 99久久精品国产观看| 亚洲蜜臀av乱码久久精品蜜桃| 欧美色精品天天在线观看视频| 日韩中文字幕区一区有砖一区| 欧美成人精品高清在线播放| 成人免费的视频| 亚洲v日本v欧美v久久精品| 欧美一级欧美三级在线观看| 国产福利91精品一区二区三区| 亚洲免费在线播放| 欧美一二三区精品| 懂色av一区二区夜夜嗨| 亚洲成a人片在线不卡一二三区| 精品毛片乱码1区2区3区| 91丨porny丨中文| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲国产成人私人影院tom | 国产精品一区在线| 亚洲男人的天堂av| 日韩色视频在线观看| 91丨九色丨黑人外教| 麻豆91在线看| 亚洲人成影院在线观看| 精品久久久久久久久久久久久久久久久 | 亚洲柠檬福利资源导航| 日韩欧美成人一区| 91小视频在线免费看| 久久精品久久99精品久久| 国产精品久久久久久户外露出| 884aa四虎影成人精品一区| 成人性色生活片免费看爆迷你毛片| 香蕉乱码成人久久天堂爱免费| 欧美—级在线免费片| 日韩一级片网址| 日本高清无吗v一区| 国内精品在线播放| 午夜在线成人av| 国产精品久久久久久久第一福利 | 在线观看免费视频综合| 国产美女精品在线| 午夜电影网亚洲视频| 中文字幕一区二区视频| 日韩视频免费观看高清完整版 | 精品成人a区在线观看| 91国产福利在线| 成人午夜在线播放| 经典三级一区二区| 午夜一区二区三区在线观看| 国产精品国产三级国产aⅴ中文 | 亚洲在线中文字幕| 欧美激情一区二区三区全黄| 91精品国产综合久久精品| 91黄色在线观看| 不卡一区在线观看| 国产成人综合在线| 韩国成人精品a∨在线观看| 日韩av成人高清| 性做久久久久久久免费看| 亚洲免费在线看| 亚洲欧美一区二区在线观看| 久久精品一级爱片| 精品国产1区2区3区| 欧美一级免费大片| 中文字幕高清一区| 久久久久久免费网| 欧美第一区第二区| 欧美一区二区三区四区在线观看 | 日韩三级在线观看| 678五月天丁香亚洲综合网| 欧美视频中文字幕| 精品视频一区三区九区| 欧美日韩亚洲国产综合|