I don't know how to make an array of vectors and matrices in Julia. For example, how I make a list p such that
p[1]=[1;2]
p[2]=[2 3; 4 5]
?
You can use an array of "Any"
p=Any[[1;2],[2 3; 4 5]]
which returns
2-element Array{Any,1}: [1, 2] [2 3; 4 5]
Any is crucial here, as if you omit it Julia in some cases might perform type conversion when constructing a wrapper vector. Here is an example when this happens (with omitted Any): [[1.0], [1]].[[1,2], [2 3; 4 5]] you get a tighter type bound, Any might be undesirable. Perhaps Array[[1,2], [2 3; 4 5]] or Array{Int}[[1,2], [2 3; 4 5]] are better options.Union{Vector{Int}, Matrix{Int}}[[1;2],[2 3; 4 5]] assuming only Vector{Int} and Matrix{Int} elements would be passed.