Reputation: 71
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]
?
Upvotes: 3
Views: 480
Reputation: 10982
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]
Upvotes: 3