Semantically, ones(n,1) creates a vector and not a matrix. Why is ones(n,1) different from ones(n)? The type system is very confusing and non-intuitive.
On Sunday, November 16, 2014 7:28:28 PM UTC-5, Andreas Noack wrote: > > The input should be two Vectors, but your first argument is a Matrix > > 2014-11-16 19:25 GMT-05:00 Eka Palamadai <ekan...@gmail.com <javascript:>> > : > >> SymTridiagonal does not seem to work properly. >> >> For e.g, the following snippet fails. >> >> julia> n=10 ; >> A=SymTridiagonal(2*ones(n,1), -1*ones(n-1)); >> ERROR: `convert` has no method matching >> convert(::Type{SymTridiagonal{T}}, ::Array{Float64,2}, ::Array{Float64,1}) >> in call at base.jl:34 >> >> Any thoughts? >> > >