In Julia, [1.0 1.0] is a 1x2 Array. If you insert commas you get a 
2-element vector and then dot works, i.e.
dot([1.0, 1.0], [1.0, 1.0])

On Tuesday, May 20, 2014 8:25:01 PM UTC-4, Altieres Del-Sent wrote:
>
>  I am used to write at matlab dot([1 1], [1 1]). I know I can use [1 1]' 
> *[1 1] to calc the dot product, but I use that way because I think is 
> faster without ask to transpose,  I tried do the samething with julia and 
> get dot([1.0 1.0],[1.0 1.0]) 
>
> MethodError(dot,(
>
> 1x2 Array{Float64,2}:
>
>  1.0  1.0,
>
>
> 1x2 Array{Float64,2}:
>
>  1.0  1.0))
>
> why?
>
>

Reply via email to