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 Kommentare

Paul
Paul am 28 Nov. 2025
Bearbeitet: Paul am 28 Nov. 2025
Wasn't this question already asked and answered in this thread?
Jack Daniels
Jack Daniels am 29 Nov. 2025
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)
Simscape
Simscape am 13 Sep. 2026
https://youtu.be/XsXpHQh3jLQ?si=l-s-lYmT1PUzaXf-

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Paul
Paul am 29 Nov. 2025
Bearbeitet: Paul am 29 Nov. 2025

0 Stimmen

"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.

Weitere Antworten (3)

Aarthi
Aarthi am 16 Jun. 2026

0 Stimmen

if true % code end
Arianna
Arianna am 18 Sep. 2026

0 Stimmen

Diese(r) Antwort wurde durch Paul markiert
  • Markiert durch Paul am 18 Sep. 2026.

    Contains link to spam

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)!.

Kategorien

Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2024b

Gefragt:

am 28 Nov. 2025

Beantwortet:

am 10 Okt. 2026 um 5:08

Community Treasure Hunt

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

Start Hunting!

Translated by