[Scilab-users] column vector consisting of the respective minima of every row in a given 2d matrix
Heinz Nabielek
heinznabielek at icloud.com
Thu Apr 5 16:34:37 CEST 2018
Friends:
a need the column vector consisting of the respective minima of every row in a given 2d matrix. So, I started off
--> M=rand(3,2)
0.2113249 0.3303271
0.7560439 0.6653811
0.0002211 0.6283918
--> mean(M,2)
0.270826
0.7107125
0.3143065
THIS LOOKS PERFECT !
--> min(M,2)
0.2113249 0.3303271
0.7560439 0.6653811
0.0002211 0.6283918
THIS IS NOT WHAT I WANT !! It gives me the minimum between "2" and the numbers in my 2d matrix.
How do I get the vector consisting of the respective minima of every row in M?
I can do it with a FOR-LOOP, but that would be clumsy......
Heinz
More information about the users
mailing list