MATLAB: Does the To-Workspace block save the variable in a higher dimension in Simulink 7.4 (R2009b)

dimensionsimoutsimulink

I have a model in which I am saving a signal to the workspace. When I inspect this variable after the simulation, Simulink saved it into the third dimension such as
simout(:,:,1) = 1;
simout(:,:,2) = 2;
simout(:,:,3) = 3;
Why is this and how can I save the output in the first dimension?

Best Answer

This is expected behavior in models that operate in frame-based simulation. This can be caused by blocks from the Communications blockset as well as the Signal Processing blockset.
To force the To-Workspace block to save to the first dimension, you can use a Signal Specification block from the Simulink -> Signal Attributes library.
Alternatively, you can use SQUEEZE on the saved variable in your workspace.
simout=squeeze(simout)