MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guía de usuario Pagina 337

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 386
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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)
Vista de pagina 336
1 2 ... 332 333 334 335 336 337 338 339 340 341 342 ... 385 386

Comentarios a estos manuales

Sin comentarios