User`s guide
Building for the Rapid Simulation Target
13-7
Replacing Input Signal Data. New data for a From File block can be placed in a
standard MATLAB MAT-file. As in Simulink, the From File block data must
be stored in a matrix with the first row containing the time vector while
subsequent rows contain
u vectorsasinputsignals.Aftergeneratingand
compiling your code, you can type the model name
rsimtfdemo at a DOS
prompt to run the simulation. In this case, the file
rsm_tfdata.mat provides
the input data for your simulation.
For the next simulation, create a new data file called
newfrom.mat and use this
to replace the original file (
rsim_tfdat.mat)andrunanrsim simulation with
this new data. This is done by typing
t=[0:.001:1];
u=sin(100*t.*t);
tu=[t;u];
save newfrom.mat tu;
!rsimtfdemo -f rsim_tfdata.mat=newfrom.mat
at the MATLAB prompt. Now you can load the data and plot the new results
by typing
load rsimtfdemo
plot(rt_yout)