delete the comma behind `1:3`, then you will get the right result.

On Tuesday, September 1, 2015 at 8:17:18 PM UTC+2, Igor wrote:
>
> Hello everybody!
>
> How is it possible to write something in array from "for" loop?  I have 
> following code:
>
> t = Array(Float64, 3, 4)
> for i = 1:3,
>   t[i, :] = [1., 2., 3., 4.]
> end
>
>
>
> But after this, all the elements inside "t" are equal to "4". How to make 
> them "1 2 3 4" ?
>
> Best regards, Igor.
>

Reply via email to