%% Smallest and Largest Elements of Vector
% Simultaneously compute the smallest and largest values of a vector.

A = [2 4 -1 10 6 3 0 -16];
[S,L] = bounds(A)

% Copyright 2012 The MathWorks, Inc.