Re: [julia-users] Return structure-like elements from a function

2016-09-27 Thread Yichao Yu
On Tue, Sep 27, 2016 at 10:11 PM, Dan wrote: > That last line was probably meant to be > > paths = Vector{Matrix{Float64}}(4) Ah, yeah, that's exactly what I meant Thx for the correction > > On Tuesday, September 27, 2016 at 7:01:14 PM UTC-4, Yichao Yu wrote: >> >> On

Re: [julia-users] Return structure-like elements from a function

2016-09-27 Thread Dan
That last line was probably meant to be paths = Vector{Matrix{Float64}}(4) On Tuesday, September 27, 2016 at 7:01:14 PM UTC-4, Yichao Yu wrote: > > On Tue, Sep 27, 2016 at 6:28 PM, Zhilong Liu > wrote: > > Hello All, > > > > I am trying to return values to elements

Re: [julia-users] Return structure-like elements from a function

2016-09-27 Thread Yichao Yu
On Tue, Sep 27, 2016 at 6:28 PM, Zhilong Liu 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

[julia-users] Return structure-like elements from a function

2016-09-27 Thread Zhilong Liu
Hello All, I am trying to return values to elements inside a structure-like matrix. Here is the code snippet: paths = [[Array{Float64,2}] for i in 1: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