To workspace Block and To Workspace Signal don't exist in workspace
17 views (last 30 days)
Seth Popinchalk on 29 Mar 2011
Variables assigned to the workspace do not appear until the model is paused or stopped. If you are trying to process the data from the simulation while the simulation is running, it is better to do that from a MATLAB S-function.
Harsha Vardhan Rao Avunoori on 29 Mar 2011
Your simulation should come to a halt if you want to export data to workspace....or try using the S-function block....
Kaustubha Govind on 30 Mar 2011
Again, as Seth pointed out, file.mat is not available until after the simulation is paused/stopped. Instead, feed the signal that you are logging as input to the S-function.
a = block.InputPort(1).Data;
% your code here