Target Language Compiler | ![]() ![]() |
Getting Started
tlctutorial
/
mygain
to your working directory, so that you can use the files provided.
Note
You must use or create a working directory outside of matlabroot / for models you make. Simulink complains and refuses to build models in its own source directories
|
simple_sin.c
(in your build directory).
/* Compute block outputs */ void MdlOutputs(int_T tid) { /* local block i/o variables */ real_T rtb_Sin; /* This is a single rate system */ (void)tid; /* Sin: '<Root>/Sin' */ rtb_Sin = rtP.Sin_Amp * sin(rtP.Sin_Freq * ssGetT(rtS)+rtP.Sin_Phase)+rtP.Sin_Bias; /* Outport: '<Root>/Out' incorporates: * Gain: '<Root>/Gain' * * Regarding '<Root>/Gain': * Gain value: rtP.Gain_Gain */ rtY.Out = (rtP.Gain_Gain * rtb_Sin); }
![]() | Exploring Variable Names and Loop Rolling | Modify the Model | ![]() |