[Scilab-users] column vector consisting of the respective minima of every row in a given 2d matrix
Stéphane Mottelet
stephane.mottelet at utc.fr
Thu Apr 5 18:08:40 CEST 2018
min(M,’c’)
> Le 5 avr. 2018 à 16:34, Heinz Nabielek <heinznabielek at icloud.com> a écrit :
>
> 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
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
More information about the users
mailing list