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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 130
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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.
Vista de pagina 79
1 2 ... 75 76 77 78 79 80 81 82 83 84 85 ... 129 130

Comentarios a estos manuales

Sin comentarios