Hi all,
I would like to obtain a matrix c that stores instead of the minimum value for each row, the column number in which the minimum value for each row is located.
For instance in the following matrix a
100 200 500 300
20 10 50 30
3 5 2 1
the command b=rowmin(a) will give that the minimum values for each row are
100
10
1
How could I obtain a matrix c that gives me the column number in which the minimum value for each row is located?
1
2
4
Thank you very much in advance for your help
Best wishes,
Maria
I would like to obtain a matrix c that stores instead of the minimum value for each row, the column number in which the minimum value for each row is located.
For instance in the following matrix a
100 200 500 300
20 10 50 30
3 5 2 1
the command b=rowmin(a) will give that the minimum values for each row are
100
10
1
How could I obtain a matrix c that gives me the column number in which the minimum value for each row is located?
1
2
4
Thank you very much in advance for your help
Best wishes,
Maria
Comment