User`s guide
4 MATLAB Interface
4-18
set(myworld,'Record3D','on');
5
Run the Simulink model. From the Simulation menu, select Mode > Normal, then
click Simulation > Run. Alternatively, if you are using the Simulink 3D Animation
default viewer, you can run the Simulink model with one of the following from the
viewer.
• From the menu bar, select the Simulation menu Start option to start or stop the
simulation.
• From the toolbar, click Start/pause/continue simulation to start the
simulation.
• From the keyboard, press Ctrl+T to start the simulation.
6
As the simulation runs, start recording the animation by setting the virtual world
Recording property. Type
set(myworld,'Recording','on');
This turns on the recording state.
7
When you want to stop the recording operation, type
set(myworld,'Recording','off');
The Simulink 3D Animation software stops recording the animation. The Simulink
3D Animation software creates the file vrplanets_anim_1.wrl in the current
working folder. If the simulation stops before you stop recording, the recording
operation stops and creates the animation file.
8
Stop the simulation. You can use one of the following from the viewer.
• From the menu bar, select the Simulation menu Stop option to stop the
simulation.
• From the toolbar, click Stop simulation to stop the simulation.
• From the keyboard, press Ctrl+T to stop the simulation.
You do not need to manually stop the recording before stopping the simulation. If
you do not manually stop the recording, the recording operation does not stop and
create the animation file when the simulation stops.
9
Close and delete the objects if you do not want to continue using them.