MethodError: no method matching*Vector{Float64}

Use . whenever you want the operation performed element-by-element. This is called broadcasting and Julia forces you to be explicit about when you want that behavior.

There is a macro available to make this a little more convenient in case you have many broadcasting operations in one line: 2 .* x .* y == @. 2 * x * y.

See more detailed explanations here:

1 Like