Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (12 sloc) 523 Bytes
% [MIN, MAX] = range2(MTX)
%
% Compute minimum and maximum values of MTX, returning them as a 2-vector.
% Eero Simoncelli, 3/97.
function [mn, mx] = range2(mtx)
%% NOTE: THIS CODE IS NOT ACTUALLY USED! (MEX FILE IS CALLED INSTEAD)
fprintf(1,'WARNING: You should compile the MEX version of "range2.c",\n found in the MEX subdirectory of matlabPyrTools, and put it in your matlab path. It is MUCH faster.\n');
if (~isreal(mtx))
error('MTX must be real-valued');
end
mn = min(min(mtx));
mx = max(max(mtx));