Save data from Simulink Scope
古いコメントを表示
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
3 件のコメント
Wasn't this question already asked and answered in this thread?
Jack Daniels
2025 年 11 月 29 日
Simscape
2026 年 9 月 13 日 18:53
https://youtu.be/XsXpHQh3jLQ?si=l-s-lYmT1PUzaXf-
採用された回答
その他の回答 (2 件)
Aarthi
2026 年 6 月 16 日
0 投票
if true
% code
end
Arianna
2026 年 9 月 18 日 4:34
この 回答 は Paul
さんによってフラグが設定されました
This is a very common issue when working with Simulink Scope logging. Looking at your screenshot, your Save format is set to Dataset (ScopeData1).
When saving as Dataset, MATLAB doesn't output plain arrays directly to the Workspace; instead, it wraps the time-series data inside a Simulink.SimulationData.Dataset object.
Extract data from the Dataset object
Check your MATLAB Workspace for the variable named ScopeData1 (or out.ScopeData1 if single simulation output logging is enabled). You can extract the signal values using:
mySignal = ScopeData1.getElement(1).Values;
plot(mySignal.Time, mySignal.Data);
Also, make sure Single simulation output isn't wrapping everything into an out object (e.g., check for out.ScopeData1 in your workspace)!.
カテゴリ
ヘルプ センター および File Exchange で Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

