Si ya conocemos el tamaño de la matriz:
In [1]:
zeros(10)
Out[1]:
In [2]:
zeros(3, 7)
Out[2]:
In [3]:
zeros(2,3,4,5)
Out[3]:
In [4]:
M = Int[]
Out[4]:
In [5]:
push!(M, 10)
Out[5]:
In [9]:
M = Any[]
Out[9]:
In [10]:
push!(M, 10)
push!(M, 10.5)
push!(M, "hola")
Out[10]:
In [11]:
push!(M, [3, 4])
Out[11]:
In [20]:
M = Vector{Float64}[]
Out[20]:
In [21]:
push!(M, [3, 4, 5])
Out[21]:
In [23]:
push!(M, [6, 7, 8])
Out[23]:
In [18]:
A = Array(Any, 3, 4)
Out[18]:
In [19]:
A[1,2]
In [24]:
M
Out[24]:
In [35]:
hcat(M[1], M[2])
Out[35]:
In [37]:
vcat(M[1]', M[2]')
Out[37]:
In [38]:
for i in 1:10
push!(M, [3,4,5])
end
In [39]:
M
Out[39]:
In [41]:
hcat(M...)'
Out[41]:
In [ ]: