## Processing simulation data with RESULTS

The Matlab macro RESULTS creates time-trajectories of individual inputs to and outputs from the Beaver model. It can be used after running a simulation involving the aircraft model.

During simulations, the time-trajectories of all inputvariables are sent to the matrix In and all time-trajectories of the outputvariables are sent to to the matrix Out in the Matlab workspace; see the input and output definitions for the Beaver model for the definitions of these matrices. Since analyzing the results directly from In and Out is possible, but not very convenient, RESULTS was created to transform these matrices into time-trajectories of individual input and output signals with self-explaining variable names.

So in order to produce a plot of the elevator deflection (for instance), instead of typing `plot(time,In(:,1))`, you can run RESULTS and then type `plot(time,deltae)`. Even easier: you can also run RESULTS first and then use the Matlab macro RESPLOT to automatically plot the most important time-trajectories.

Note: RESULTS only works correctly if the definitions of the matrices In and Out are not changed by editing the aircraft model. If the definitions are changed, then the file RESULTS.M in in the subdirectory TOOLS needs to be edited accordingly. Apart from some options regarding the units of measurements of the variables that represent angles and/or angular velocities, the macro RESULTS is very straightforward, so adapting this file is not very difficult.

RESULTS does not contain a 'save' option, so remember to save the resulting time-trajectories yourself if you want to use them later. Don't forget to store the time-axis time too; otherwise you won't be able to plot the time-trajectories of the variables afterwards.