DSP Blockset    

Basic Operations

A basic operation is one that processes each input independently of previous and subsequent inputs. For example, in basic mode (with Value and Index selected, for example) the Maximum block finds the maximum value in each column of the current input, and returns this result at the top output (Val). Each consecutive Val output therefore has the same number of columns as the input, but only one row. Furthermore, the values in a given output only depend on the values in the corresponding input. The block repeats this operation for each successive input.

This type of operation is exactly equivalent to the MATLAB command

which computes the maximum of each column in input u.

The next section provides an example of a basic statistical operation.

Example: Sliding Windows

You can use the basic statistics operations in conjunction with the Buffer block to implement basic sliding window statistics operations. A sliding window is like a stencil that you move along a data stream, exposing only a set number of data points at one time.

For example, you may want to process data in 128-sample frames, moving the window along by one sample point for each operation. One way to implement such a sliding window is shown in the model below.

The Buffer block's Buffer size (Mo) parameter determines the size of the window. The Buffer overlap (L) parameter defines the "slide factor" for the window. At each sample instant, the window slides by Mo-L points. The Buffer overlap is often Mo-1 (the same as the Delay Line block), so that a new statistic is computed for every new signal sample.

To build the model, make the following settings:


  Statistics Running Operations