MOTDSP566 Blockset

 

     Search     Help Desk 
MOTDSP566 Maximum  Contents   See Also

Purpose

Find the maximum value of one or two input vector(s).

Library

Motdsp566lib

Description

The MOTDSP566 Maximum block identifies the value and position of the largest element in the input.

If the block has two input vectors, the block performs an element-by-element comparison of the input vectors. Each element of the block output vector is the result of the comparison of the elements of the input vectors.

If the block has only one input vector, the Mode parameter specifies the block's mode of operation and can be set to Value, Index, or Value and Index. These settings are described below.

Value

When Mode is set to Value, the block computes the maximum value of the input vector.

The block output, y, is the maximum value of the input vector. For complex inputs the block uses the magnitude of the input, abs(u(:)), to identify the maximum. The output is the corresponding complex value from the input.

Index

When Mode is set to Index, the block performs the computation shown above, and outputs the index, i, corresponding to the position of the maximum value in the input vector. The index is an integer in the range [1 length(u(:))].

If there are duplicates of the maximum value in the input, the index corresponds to the first occurrence. For example, if the vector input is [.3 .2 .1 .2 .3], the index of the maximum value is 1, not 5.

Value and Index

When Mode is set to Value and Index, the block outputs both the value, y, and the index, i.

In all three of the above modes, a matrix input, u, is treated as a vector, u(:).

Dialog Box

Command File
Command File used by Motorola DSP566xx simulator core.
DSP Processor Type
Select the DSP Processor to be used.
Number of input ports
Number of input ports.
Mode
The block's mode of operation: Output the maximum value of each input, the index of the maximum value, both the value and the index.
Simulation Time to enter Interactive Mode (secs):
Simulation time to step into the assembly code by launching the assembly language debugger. This parameter must be a scalar greater than or equal to zero. This parameter will be ignored if not using Interactive Mode.

See Also

MOTDSP566 Minimum Smallest component


[ Previous | Help Desk | Next ]