%% Compute the Minimum
% Compute the minimum of a 3-by-2 matrix input, |dsp_examples_u|,
% using the <docid:dsp_ref#bvk0b83-1 Minimum> block.
%
%%
% Open the model.
model = 'ex_minimum_ref';
open_system(model)

%%
% The *Mode* parameter of the Minimum block is set to |Value and Index|. 
% The block processes the input as a two-channel signal with a frame size 
% of three. 

%% 
% Run the model. Display the input and output values.
sim(model)
disp('Data Input')
disp(dsp_examples_u)
disp('Minimum Values')
disp(min_val)
disp('Min Index Array')
disp(min_index)

%%
% In the |Value and Index| mode, the block outputs:
%
% * The minimum value over each frame of data along the channel. 
% * The index of the minimum value in the respective frame.
% 

%%
% Close the model.
close_system(model)

%% 
% Copyright 2012 The MathWorks, Inc.