MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Betriebsanweisung Seite 80

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 130
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 79
3 Working with Real-Time Workshop
3-24
4 Click Apply to register your changes.
5 Generate code and build an executable: Click the Build button, type
Ctrl+B, or select Build Model... from the Real-Time Workshop sub-menu
of the
Tools menu in the model window.
6 When the build concludes, run the executable with the command
!f14rtw
7 The program now produces two message lines, indicating that the
MAT-file has been written.
** starting the model **
** created f14rtw.mat **
8 Load the MAT-file data created by the executable and look at the
workspace variables from simulation and the generated program:
load f14rtw.mat
whos tout* yout*
Name Size Bytes Class
tout 601x1 4808 double array
tout_rt 601x1 4808 double array
yout 601x2 9616 double array
yout_rt 601x2 9616 double array
Grand total is 3606 elements using 28848 bytes
Note that all arrays have the same number of elements.
9 Observe that the variables tout_rt (time) and yout_rt (G Force and Angle
of Attack) have been loaded from the file. Plot G Force as a function of time.
plot(tout_rt,yout_rt(:,2))
This plot is identical to the plot you produced in step 9 of the first part of
this exercise.
Seitenansicht 79
1 2 ... 75 76 77 78 79 80 81 82 83 84 85 ... 129 130

Kommentare zu diesen Handbüchern

Keine Kommentare