Hi,
You didn't tell us what to do with the other numbers, so I'm assuming you
can also have two columns per row?
for row=1:size(ma,1)
ma[row, 1] = (ma[row, 1] >= ma[row, 2])
ma[row, 2] = (ma[row, 1] < ma[row, 2])
end
gives
4x2 Array{Float64,2}:
1.0 0.0
0.0 1.0
0.0 1.0
1.0 0.0
El martes, 6 de octubre de 2015, 12:43:58 (UTC-5), Rosangela Oliveira
escribió:
>
> Hi,
> How to replace the values in a matriz using maxval and minval?
> for example, I would change the max value in a line for o(zero) and the
> max value for one.
>
>
> I'm trying something like this...
>
> ma=[0.4 0.3; 0.6 0.9;-0.6 15;0.5 0.5]for i1 = 1:size(ma,1)
> max=findmax(ma[i1,:])
> min=findmin(ma[i1,:])
> end
>
>
> Thanks for helping.
>
>