Well I think the problem here is that though M[:,1]' * M[:,1] has only 1 
value, it's still a (1x1) matrix, and not a scalar.
What happens when you change to this?

a=(M[:,1]' * M[:,1])[1]

related.  is automatically converting a 1x1 matrix to a scalar or defining 
comparison between 1x1 matrices and scalars reasonable?

On Friday, May 15, 2015 at 5:14:43 PM UTC-4, Lytu wrote:
>
> When i do:
> M=rand(5,5)
> a=M[:,1]' * M[:,1]
> if a<0
> println("Less than 0")
> else
> println("more")
> end
>
> I have an error: " isless has no method matching 
> isless(::Array{Float64,2}, ::Int 32) in < at operators.jl:32
>
> Can anyone tell me please how to do this? Thank you
>

Reply via email to