On Tue, Sep 27, 2016 at 6:28 PM, Zhilong Liu <lzl200102...@gmail.com> wrote: > Hello All, > > I am trying to return values to elements inside a structure-like matrix. > Here is the code snippet: >
What you actually meant to write is paths = [Array{Float64,2}() for i in 1:4] And you might as well do paths = Matrix{Float64}(4) > for i = 1 : 4 > paths[i] = compute_path(i) > end > > I would like each path[i] element to be a Nx3 matrix. But I got an error > saying > > MethodError: `convert` has no method matching > convert(::Type{Array{DataType,1}}, ::Array{Float64,2}) > > > Do anyone know how to do this properly? > > > Thanks! > > Zhilong Liu > >