MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS Guida Utente Pagina 116

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 210
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 115
3 Writing S-Functions As C-MEX files
3-72
/* Function: mdlOutputs =======================================================
* Abstract:
* y = x
*/
static void mdlOutputs(SimStruct *S, int_T tid)
{
real_T *y = ssGetOutputPortRealSignal(S,0);
real_T *x = ssGetRealDiscStates(S);
/* Return the current state as the output */
y[0] = x[0];
}
#define 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)
{
real_T *x = ssGetRealDiscStates(S);
InputRealPtrsType uPtrs = ssGetInputPortRealSignalPtrs(S,0);
x[0]=U(0);
}
/* Function: mdlTerminate =====================================================
* Abstract:
* No termination needed, but we are required to have this routine.
*/
static void mdlTerminate(SimStruct *S)
{
}
#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
Vedere la pagina 115
1 2 ... 111 112 113 114 115 116 117 118 119 120 121 ... 209 210

Commenti su questo manuale

Nessun commento

Sony CDP-CX400 manuals

Owner’s manuals and user’s guides for CD players Sony CDP-CX400.
We providing pdf manuals Sony CDP-CX400 for download free by document types:






More products and manuals for CD players Sony

Models Document Type
CDX-V58MP User Manual   Sony CDX-V58MP User's Manual, 4 pages
D-VJ85 User Manual   Sony D-VJ85 User manual, 36 pages
MDX-C8900R User Manual    Sony MDX-C8900R Manual de usuario, 186 pages
HDX266/HDX267W User Manual   Sony HDX266/HDX267W User's Manual, 104 pages
CDX-M10 Operations Instructions       Sony CDX-M10 Operating Instructions, 116 pages
MEX-BT2700 User Manual    Sony MEX-BT2700 User's Manual, 56 pages
CDP-M555ES User Manual   Sony CDP-M555ES User's Manual, 48 pages
CDX-M30 User Manual       Sony CDX-M30 User's Manual, 144 pages
D-E660 User Manual   Sony D-E660 User's Manual, 32 pages
D-MJ95 User Manual   Sony D-MJ95 User manual, 28 pages
D-F21 User Manual   Sony D-F21 User manual, 24 pages
D-E561 User Manual   Sony D-E561 User's Manual, 2 pages
CDX-434RF User Manual    Sony CDX-434RF User manual, 4 pages
CDP-CX335 User Manual    Sony CDP-CX335 User manual, 68 pages
D-E551 User Manual   Sony D-E555 User manual, 2 pages
CDX-C910 User Manual    Sony CDX-C910 User manual, 62 pages
HAR-D1000 User Manual   Sony HAR-D1000 User's Manual, 36 pages
CFD-360 User Manual    Sony CFD-360 User manual, 60 pages
D-SJ01 User Manual   Sony D-SJ01 User manual, 24 pages
CFD-577 User Manual   Sony CFD-577 User manual, 36 pages