Range of a matrix
12 views (last 30 days)
Show older comments
Hi all,
I tried to find 'range' of a matrix but always return error. For example;
Data=rand(10,10)
range(Data,'all') always return the follwing error;
''Error using max
Invalid option. Option must be 'omitnan' or 'includenan'.
Error in range (line 20)
y = max(x,[],dim) - min(x,[],dim);''
Does anyone knows whats the problem please?
thanks
0 Comments
Accepted Answer
More Answers (1)
AUWAL ABUBAKAR
on 25 Mar 2019
1 Comment
Stephan
on 25 Mar 2019
% 2D Array
ROI=rand(10,10)
Range1 = range(ROI(:))
% 3D Array
ROI=rand(10,10,3)
Range2 = range(ROI(:))
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!