julia> m
1913x2 Array{Float64,2}:
201.07 6597.95
202.092 17835.7
202.944 9667.59
204.015 11983.4
204.811 7586.52
205.803 1.1506
....
julia> a = Array{Float64,2}
Array{Float64,2}
push!(a, 10.0,3.0)
ERROR: MethodError: `push!` has no method matching push!(::Type{Array{Float64,2}}, ::Float64)
Closest candidates are:
push!(::Any, ::Any, ::Any)
push!(::Any, ::Any, ::Any, ::Any...)
push!(::Array{Any,1}, ::ANY)
push!(a, [10.0,3.0])
ERROR: MethodError: `push!` has no method matching push!(::Type{Array{Float64,2}}, ::Array{Float64,1})
Closest candidates are:
push!(::Any, ::Any, ::Any)
push!(::Any, ::Any, ::Any, ::Any...)
push!(::Array{Any,1}, ::ANY)
append!(a, [10.0,3.0])
ERROR: MethodError: `append!` has no method matching append!(::Type{Array{Float64,2}}, ::Array{Float64,1})
Closest candidates are:
append!{T}(::Array{T,1}, ::AbstractArray{T,1})
append!{T}(::StatsBase.AbstractHistogram{T,1,E}, ::AbstractArray{T,1})
append!{T}(::StatsBase.AbstractHistogram{T,1,E}, ::AbstractArray{T,1}, ::StatsBase.WeightVec{W,Vec<:AbstractArray{T<:Real,1}})
...
julia> b = Array[]
0-element Array{Array{T,N},1}
julia> b = Array[]
0-element Array{Array{T,N},1}
julia> reshape(b,2,2)
ERROR: DimensionMismatch("new dimensions (2,2) must be consistent with array size 0")
in reshape at array.jl:146
in reshape at abstractarray.jl:215
julia> b = [1 2; 3 4]
2x2 Array{Int64,2}:
1 2
3 4
julia> push!(b,[5,6])
ERROR: MethodError: `push!` has no method matching push!(::Array{Int64,2}, ::Array{Int64,1})
julia> append!(b,[5,6])
ERROR: MethodError: `append!` has no method matching append!(::Array{Int64,2}, ::Array{Int64,1})
julia> c = [1 2 3 4]
1x4 Array{Int64,2}:
1 2 3 4julia> reshape(c,2,2)
2x2 Array{Int64,2}:
1 3
2 4
julia> a = []
0-element Array{Any,1}
julia> b = []
0-element Array{Any,1}
julia> push!(a, 1)
1-element Array{Any,1}:
1
julia> push!(a, 2)
2-element Array{Any,1}:
1
2
julia> a
4-element Array{Any,1}:
1
2
3
4
julia> b
4-element Array{Any,1}:
10
20
30
40
julia> C = [a b]
4x2 Array{Any,2}:
1 10
2 20
3 30
4 40
julia> reshape(d,3,2)
3x2 Array{ASCIIString,2}:
"x1" "y2"
"y1" "x3"
"x2" "y3"
you see the problem ? instead I would like to have :
x1 y1
x2 y2
..
xn yn
julia> reshape(d,2,3)'
3x2 Array{ASCIIString,2}:
"x1" "y1"
"x2" "y2"
"x3" "y3"