find values from array
Show older comments
Accepted Answer
More Answers (1)
First 3 Maximum values
sorted_values_des = sort(A, 'descend');
maximun_3 = sorted_values_des(1:3);
Coming to minimum values
sorted_values_asc = sort(A);
values_gt_0 = sorted_values_asc(sorted_values_asc>0);
minimun_2 = values_gt_0(1:2);
Hope helps you !!
Categories
Find more on MATLAB 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!