MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Guide de l'utilisateur Page 337

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 386
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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)
Vue de la page 336
1 2 ... 332 333 334 335 336 337 338 339 340 341 342 ... 385 386

Commentaires sur ces manuels

Pas de commentaire