MATLAB: I have problems with “To Workspace”

to workspace

Hi. I am using R2020a, and have some problems with using a To workspace block.
First, even though I set the variable name of the block y, the name of the output in the workspace is still 'out'.
Second, the matrix of the 'out' result is always 1 by 1.
Does anyone know what is wrong?

Best Answer

'out' is just the name of the structure that includes all the variables in all the "To Workspace" blocks. Your variable is in out.y. Just type in "out.y" in Command Window after simulation is done.