Peterstone
Peterstone

Reputation: 7449

Matlab: How to see a simulations results

I am finding out how to use the 'From workspace' and 'to workspace' blocks in order to perform a simulation in a .mdl file by doing a small exercise as you see in the picture below. I get something from simulink to workspace, a variable called 'simout' but I don´t know how to acces to this variable. Does anyone could tell me how to see the results of my simulation? I enter the name of the variable 'simout' but I don´t get nothing, only this message:

simout = 

     time: []
  signals: [1x1 struct]
blockName: 'Fromworkspace/To Workspace'

Thank you so much! enter image description here

Upvotes: 1

Views: 4029

Answers (2)

Nzbuu
Nzbuu

Reputation: 5251

The data are in simout.signals.values and the times are in simout.time.

Upvotes: 3

Peterstone
Peterstone

Reputation: 7449

I´ve found the solution:

enter image description here

If I select the variable output format as an array, then when I wrote the name of the variable in workspace then the numerics value are printed.

Upvotes: 0

Related Questions