Log simulink (variable step) data with with one sample time!
8 次查看(过去 30 天)
显示 更早的评论
Hello guys,
is there a way to log signals with one sample time?
I habe an system model which works with variable steps. Form 1e-3s to 50e-6s.
For the post-processing i would like to save all data to an Excel or plot data wih origins have different sample times.
At the moment my ways is to youse a rate transition block.
Is there a more elegant way?
Thanks in advance.
0 个评论
采纳的回答
Fangjun Jiang
2021-5-4
You can always specify the sample time of the data logging (ToWorkspace block or signal logging). Keep in mind though that this actually force the simulation steps to be changed, even when you specify variable step and variable step solver. But if you don't mind the effect, you can go ahead.
Another way is to log the data using inherited sample time and run resample() to do post data processing.
2 个评论
Fangjun Jiang
2021-5-4
right click the signal line, properties, give it a name, check "log signal data" and specify the sample time
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Prepare Model Inputs and Outputs 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!