Getting Started    

Frames and Frame-Based Processing

A frame is a sequence of samples combined into a single vector. By setting Samples per frame to 100 in the Sine Wave block, you set the frame size to 100, so that each frame contains 100 samples. This enables the Vector Scope block to display enough data for a good picture of the sine wave.

Another important reason to set the frame size is that many Communications Blockset blocks require their inputs to be vectors of specific sizes. If you connect a source block, such as the Sine Wave block, to one of these blocks, you can set the input size correctly by setting Samples per frame to the required value. The model described in Reducing the Error Rate Using a Hamming Code shows how to do this.

In frame-based processing all the samples in a frame are processed simultaneously. In sample-based processing, on the other hand, samples are processed one at a time. The advantage of frame-based processing is that it can greatly increase the speed of a simulation. If you see double lines between blocks, the model uses frame-based processing.


  Saving a Model Discrete Signals and Sample Times