How to save 'Scope' data in Simulink into WorkSpace to plot?
조회 수: 125 (최근 30일)
이전 댓글 표시
Dear all,
I have used in the past the simulation data from Simulink in a way that: in the Scope block in Simulink, by modifying the settings / properties > logging > log into WorkSpace > name of the file and type (either array or dataset).
Then in a script file (filename.m), just by using the 'sim' function I run the simulation and save the generated data into WorkSapce as logged, then I could easily plot it.
But now I see that Simulink Scope block sends the logged data into SimulationOutput foler insdie the WorkSpace and as a result, it cannot be plotted directly.
Any hints?
I feel it should be a bug in my MATLAB version.
댓글 수: 0
답변 (1개)
Sulaymon Eshkabilov
2023년 7월 17일
The saved/stored data in the workspace from the Scope block can be plotted and processed without any difficulty only if one can handle how to call the data.
See this answer of mine posted here: https://www.mathworks.com/matlabcentral/answers/1914730-using-scope-in-matlab-simulink-to-display-when-input-s-value-changes
That shows how to obtain a data from the Simulink model and store it (a data variable from scope is called Out) in the MATLAB workspace, and then plot the stored data.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 View and Analyze Simulation Results에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!