Discrete S-Function doesn't update inputs
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have written a C MEX-S-Function for my model. I set the sample time as follows:
static void mdlInitializeSampleTimes(SimStruct *S)
{
ssSetSampleTime(S, 0, 0.001);
ssSetOffsetTime(S, 0, 0.0);
}
The input of the model is a continuous signal from a physical model. As I specified the sampling time I expect the S-Function to sample the signal accordingly but it doesn't. The S-Function doesn't recalculate. If I set a unit delay in front of the input, the S-Function works as expected but I falsly introduce a delay. How can I solve this issue?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Block and Blockset Authoring 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!