DSPRelated.com
Forums

Simulink with the data from the workspace.

Started by Lei Shi July 30, 2002
Dear all,
 
I want to run a simulink with the data from the workspace. I use the following the following command lines:
 
    f=i+3.5;
    t=(0:0.016:50)';
    u=sin(2*pi*f*t);
    ut=[t,u];
    sim('try_3');
 
and I set the parameter 'data' of block 'from workspace' as 'ut'. However, it occurs error information as following:
 
??? Error using ==> sim
Error evaluating parameter 'VariableName' in block 'try_3/From Workspace': Undefined function or variable 'ut'.
 
Error in ==> E:\Documents and Settings\TDYS\My Documents\Research\Work\FFT&DFT\test_fft.m
On line 9  ==>     sim('try_3');
 
I don't know why 'ut' is undefined and how to defind it?
 
Thanks a lot.