How to choose the maximum value in the given matrix ?

1 view (last 30 days)
i have an matrix like this
a=[ X Y E D
4.3066 22.2961 0.9986 123.2685
15.7457 67.8913 0.9994 90.1652
32.7280 138.5675 0.9995 77.5434
43.8239 86.4116 0.9996 57.7962
75.8042 139.3684 0.9997 46.2094
86.4146 7.1168 0.9994 93.8715
87.3463 156.3322 0.9996 57.7359
122.8100 10.3564 0.9994 92.5002
127.8734 166.2267 0.9996 71.8534
131.3343 195.9349 0.9992 100.9225
151.0350 175.8058 0.9994 91.3843
158.0552 4.5279 0.9990 111.7377
163.0025 132.2639 0.9996 70.7833
163.0269 178.6225 0.9992 100.7665
168.8449 147.0092 0.9995 83.3636 ];
from this i want to choose smallest 'D' value like this
small_D=[ X Y E D
75.8042 139.3684 0.9997 46.2094];

Accepted Answer

Mischa Kim
Mischa Kim on 27 Nov 2014
Edited: Mischa Kim on 27 Nov 2014
Arul, you could use
[M,I] = min(a(:,4));
small_D = a(I,:);

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!