max and min row from an array
1 view (last 30 days)
Show older comments
let there is a 7x2 matrix
[1 2
3 4
5 5
6 7
8 9
10 11
-2 -4]
can i get a row that has min value and a row that has max value?
1 Comment
garima sharma
on 11 Jan 2021
A = [1 2;3 4;5 5;6 7;8 9;10 11;-2 -4];
m = max(A);
n = min(A);
mm = [m;n];
Answers (1)
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!