Documentation Center

  • Trial Software
  • Product Updates

Display a Sequence of Images

This example displays a sequence of images, which were saved in a folder, and then stored in a variable in the MATLAB® workspace. At load time, this model executes the code from the Batch Process Image Files example, which stores images in a workspace variable.

You can open the example model by typing

ex_display_sequence_of_imagesex_display_sequence_of_images

at the MATLAB command line.

  1. The Video From Workspace block reads the files from the MATLAB workspace. The Signal parameter is set to the name of the variable for the stored images. For this example, it is set to my_video.

  2. The Video Viewer block displays the sequence of images.

  3. Run your model. You can view the image sequence in the Video Viewer window.

  4. Because the Video From Workspace block's Sample time parameter is set to 1 and the Stop time parameter in the configuration parameters, is set to 10, the Video Viewer block displays 10 images before the simulation stops.

Pre-loading Code

To find or modify the pre-loaded code, select File > Model Properties > Model Properties. Then select the Callbacks tab. For more details on how to set-up callbacks, see Callbacks for Customized Model Behavior.

Configuration Parameters

You can locate the Model Configuration Parameters by selecting Model Configuration Parameters from the Simulation menu. For this example, the parameters on the Solver pane, are set as follows:

  • Stop time = 10

  • Type = Fixed-step

  • Solver = Discrete (no continuous states)

Was this topic helpful?