Robochameleon  v1.0
findrange.m
Go to the documentation of this file.
1 
2 function [minmax,minmax_struct] = findrange(x)
3 % Finds min-max range of a vector/matrix
4 
5 min_ = min(x);
6 max_ = max(x);
7 if ~isscalar(min_) || ~isscalar(max_)
8  for i=2:ndims(x)
9  min_ = min(min_);
10  max_ = max(max_);
11  end
12 end
13 
14 minmax_struct = struct('min',min_,'max',max_);
15 minmax = [min_ max_];
function findrange(in x)
Finds min-max range of a vector/matrix.