?? exm09222_1_acc.c
字號:
#if 0
This file is not available for use in any application other than as a
Matlab(R) MEX file for use with the Simulink(R) Accelerator product.
If you do not have the Real-Time Workshop licensed, this file contains
encrypted block names, etc. If you purchase the Real-Time Workshop,
this file will contain full block descriptions and improved variable
names.
#endif
/*
* exm09222_1_acc.c
*
* Real-Time Workshop code generation for Simulink model "exm09222_1_acc.mdl".
*
* Model Version : 1.3
* Real-Time Workshop file version : 4.0 $Date: 2000/09/19 19:45:27 $
* Real-Time Workshop file generated on : Sat Aug 11 16:23:12 2001
* TLC version : 4.0 (Aug 21 2000)
* C source code generated on : Sat Aug 11 16:23:12 2001
*
* Relevant TLC Options:
* InlineParameters = 0
* RollThreshold = 5
* CodeFormat = S-Function
*
* Simulink model settings:
* Solver : VariableStep
* StartTime : 0.0 s
* StopTime : 10.0 s
* Variable step solver used
*/
#include <math.h>
#include <string.h>
#include "exm09222_1_acc.h"
#include "exm09222_1_acc_prm.h"
/* Start of Functions in model "exm09222_1_acc" */
/* Compute block outputs */
static void mdlOutputs(SimStruct *S, int_T tid)
{
/* simstruct variables */
exm09222_1_BlockIO *exm09222_1_B = (exm09222_1_BlockIO *) _ssGetBlockIO(S);
exm09222_1_Parameters *exm09222_1_P = (exm09222_1_Parameters *) ssGetDefaultParam(S);
/* SignalGenerator Block: <Root>/Signal Generator */
{
real_T phase = (exm09222_1_P->Signal_Generator_Frequency)*ssGetT(S);
phase = 1.0-2.0*(phase-floor(phase));
exm09222_1_B->w_t = (exm09222_1_P->Signal_Generator_Amplitude)*phase;
}
/* Sin Block: <Root>/Sine Wave */
exm09222_1_B->s_t = (exm09222_1_P->Sine_Wave_Amp) *
sin((exm09222_1_P->Sine_Wave_Freq) * ssGetT(S) + (exm09222_1_P->Sine_Wave_Phase));
/* Scope Block: <Root>/Scope */
/* Call into Simulink for Scope */
ssCallAccelRunBlock(S, 0, 2, SS_CALL_MDL_OUTPUTS);
}
/* Perform model update */
#define MDL_UPDATE
static void mdlUpdate(SimStruct *S, int_T tid)
{
/* (no update code required) */
}
/* End of Functions in model "exm09222_1_acc" */
#include "exm09222_1_acc_reg.h"
/* [EOF] exm09222_1_acc.c */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -