Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Extract minimum row value for every column in 2D matrix

1 vue (au cours des 30 derniers jours)
Pankaja Tanjore
Pankaja Tanjore le 19 Déc 2015
Clôturé : Guillaume le 19 Déc 2015
A = [8 4; 3 6; 2 7; 1 4; 2 3;2 1;3 1; 3 5; 8 6; 8 1];
B = sortrows(A);
I want to get the following output
ans = 2 1;
2 3;
1 4;
3 5;
3 6;
2 7
I want to get only the minimum row for every column.
I have 2 1 and 3 1 in the above array. Here minimum row for column 1 is 2. so i want only 2 1 .
Similarly i have elements 1 4 and 8 4 in the above array. Here minimum row for column 4 is 1. So i want only 1 4.
Please let me know how this is done in MATLAB
Looking forward to hear from you
Thanks
Pankaja

Réponses (0)

Cette question est clôturée.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by