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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 210
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 191
4 Guidelines for Writing C MEX S-Functions
4-26
rtY.Out1 = rtb_buffer2;
/* S-Function Block: <Root>/S-Function1 */
{
real_T *xData = &rtP.S_Function1.XData[0];
real_T *yData = &rtP.S_Function1.YData[0];
int_T idx;
idx = GetDirectLookupIndex(xData, 5, rtb_Sine_Wave);
rtb_buffer2 = yData[idx];
}
/* Outport Block: <Root>/Out2 */
rtY.Out2 = rtb_buffer2;
}
/* Perform model update */
void MdlUpdate(int_T tid)
{
/* (no update code required) */
}
/* Terminate function */
void MdlTerminate(void)
{
/* (no terminate code required) */
}
#include “sfun_directlook_ex.reg”
/* [EOF] sfun_directlook_ex.c */
This is the code that is
inlined for the bottom
S-function block i n the
sfun_directlook_ex
model.
Vedere la pagina 191
1 2 ... 187 188 189 190 191 192 193 194 195 196 197 ... 209 210

Commenti su questo manuale

Nessun commento