Save data from Simulink Scope

21 ビュー (過去 30 日間)
Jack Daniels
Jack Daniels 2025 年 11 月 28 日 9:20
編集済み: Paul 2025 年 11 月 29 日 13:16
I have checked "Log data to workspace" in the Simulink Scope under the Logging pane, but after running the simulation, no data are saved to the workspace.
Is there any additional setting required to ensure that the data are stored correctly?
Thank you
  2 件のコメント
Paul
Paul 2025 年 11 月 28 日 14:54
編集済み: Paul 2025 年 11 月 28 日 14:54
Wasn't this question already asked and answered in this thread?
Jack Daniels
Jack Daniels 2025 年 11 月 29 日 10:00
I have this setting: is it correct?
DataScope1 is strored inside out?
How to get data out and plot again the same way as on oroginal scope 'cause when right clickng there is no option to plot ? ... something as plot(ScopeData1)

サインインしてコメントする。

採用された回答

Paul
Paul 2025 年 11 月 29 日 12:05
編集済み: Paul 2025 年 11 月 29 日 13:16
"I have this setting: is it correct?"
It's correct if you want all of your logged variables to be contained within a single variable called "out". Uncheck the box if you'd rather have all of your logged variables be sent to the workspace individually.
"[ScopeData1] is strored inside [the variable named] out?"
Yes
"How to get data out and plot again the same way as on oroginal scope 'cause when right clickng there is no option to plot ? ... something as plot(ScopeData1)"
For plotting:
plot(out.ScopeData1)
For access more generally, see:
See Simulink.SimulationOutput for how to work with the variable named "out".
See Simulink.Simulation.Dataset for how to work with datasets. Or, change the Save Format in the Logging properties of the scope to an alternative format if preferred.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeView and Analyze Simulation Results についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by