Thread Subject: inlining a C S-block with none empy mdlInitializeSampleTimes

Subject: inlining a C S-block with none empy mdlInitializeSampleTimes

From: Steven Evans

Date: 2 Sep, 2009 13:16:02

Message: 1 of 1

hi,
  I am looking at inlining an s-block. The block sets its sample time form a parameter. What do i need to add to the tlc file (if anything) to accomedate this.
 
static void mdlInitializeSampleTimes(SimStruct *S)
{
double *dSampleTime=mxGetPr(ssGetSFcnParam(S, 3));
/* Set things up to run with inherited sample time */
ssSetSampleTime(S, 0, dSampleTime[0]);
ssSetOffsetTime(S, 0, 0);
}

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
tlc mdlinitiali... Steven Evans 2 Sep, 2009 09:19:23
rssFeed for this Thread

Contact us at files@mathworks.com