Code covered by the BSD License  

Highlights from
smallestMin

Be the first to rate this file! 0 Downloads (last 30 days) File Size: 2 KB File ID: #24809

smallestMin

by Brian Schrameck

 

21 Jul 2009

The smallest component of all vector and/or matrix inputs.

| Watch this File

File Information
Description

SMALLESTMIN(X), where X is any number of vectors and/or matrices, is the smallest component present in any of these structures. SMALLESTMIN(X) is consistent with MATLAB's built-in MIN(X) for vectors only!! SMALLESTMIN(X) for a matrix returns the equivalent of MIN(MIN(X)). SMALLESTMIN accepts mixed inputs of vectors and matrices. A matrix is defined as having exactly 2 dimensions.

VALID INPUTS: row and column vectors and 2-D matrices. These can contain characters, complex numbers, and numerics. Logicals, doubles, singles, int8, uint8, int16, int32, and uint32 are also valid.
INVALID INPUTS: cell arrays, 64-bit signed and unsigned values, structures, function handles, user classes, and java classes.

These lists may not be all-inclusive.

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
22 Jul 2009 us

another way

function r=gmin(varargin)
try
r=min(cellfun(@(x) min(x(:)),varargin));
catch %#ok
error('invalid input argument(s)');
end
end

us

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
smallest Brian Schrameck 21 Jul 2009 14:48:57
min Brian Schrameck 21 Jul 2009 14:48:58

Contact us at files@mathworks.com