How can I start data logging for a special signal at a special time with matlab code?
4 views (last 30 days)
Show older comments
I want to log a signal in simulink for a time x. I am interested for a special point of time as soon a definded error value is reached. Is there any possibility to control the signal logging start time via matlab code. So that e.g. the signal logging begins at simulation time 3600 seconds? Backround is that the simulation runs very long and the needed memory for the logged signal is limited. So I want to log the signal later and ignore the time area which os not important for my analysis. Thank you in advance.
0 Comments
Accepted Answer
Rishi
on 1 Jan 2024
Hi Melanie,
I understand that you want to know how to log a Simulink signal for a specific time range.
This can be done by setting the 'Logging Intervals' parameter in the model configuration parameters 'Data Import/Export' pane. The logging intervals are specified as an 'n' by 2 matrix, where 'n' is the number of intervals. The number in the first column indicates the start of the logging interval, and the number in the second column indicates the end of the interval.
You can learn more about Specifying Logging Intervals from the following documentation;
Additional information about Logging Intervals can be found from this documentation:
You can also refer to the following example to learn how to set the parameters while simulating your model:
Hope this helps!
1 Comment
More Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!