MATLAB Answers

Issue in To workspace block in 2019b

235 views (last 30 days)
Moreshwar Inamdar
Moreshwar Inamdar on 5 Dec 2019
Commented: Fangjun Jiang on 6 Dec 2019
I have a simulink model which uses to workspace block. The to workspace block is set to a 'array' that outputs variable in to my matlab workspace window. When I run the model, it runs and output on matlab workspace occure as out which gives 1*1 simulationout structure and there is my variable and I am unable to getting this variable but with lower version of matlab I were directly getting array variable how should I solve this problem?


Sign in to comment.

Answers (1)

Fangjun Jiang
Fangjun Jiang on 5 Dec 2019
Drag a "To Workspace" block from the library, if you only change the fomat from "Timeseries" to "array", then the variable in the workspace is out.simout


Show 1 older comment
Fangjun Jiang
Fangjun Jiang on 5 Dec 2019
can't really understand you. What is the issue? Example?
Moreshwar Inamdar
Moreshwar Inamdar on 6 Dec 2019
here I am attaching image which is explaning my issue regarding to workspace block, variables are come in main workspace through 'ans struct' and not like simplay array even though I folow same procedure as you mentioned.workspace.png
Fangjun Jiang
Fangjun Jiang on 6 Dec 2019
That is correct. When you specify the variable name "simout" in the "To Workspace" block, it used to be the data will be saved to variable "simout". Now it is saved in the structure "out.simout". This change happened in R2019b.
This is better. Easier to organize data. Avoid overwriting when there is a signal object in workspace but user wants to save the log with the signal name.

Sign in to comment.




Community Treasure Hunt

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

Start Hunting!

Translated by