In matlab,* is matrix multiplication.

so:

a=[1 2 3]; % row vector

b = [1;2;3]; % column vector

b*a =

1 * *

* 4 *

* * 9

I'm not going to write it out, but you get the picture.

If you just want to multiply the first element of a times b, the second, etc. then use .*

b.*a = [1 4 9]

so:

a=[1 2 3]; % row vector

b = [1;2;3]; % column vector

b*a =

1 * *

* 4 *

* * 9

I'm not going to write it out, but you get the picture.

If you just want to multiply the first element of a times b, the second, etc. then use .*

b.*a = [1 4 9]