MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Uživatelská příručka Strana 337

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 386
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 336
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)
Zobrazit stránku 336
1 2 ... 332 333 334 335 336 337 338 339 340 341 342 ... 385 386

Komentáře k této Příručce

Žádné komentáře