Operations applied to variables can also be applied to vectors however some care must be taken. Create the following two vectors:
>> a = [5 6 7] >> b = [1 2 3]
Try adding the vectors.
Now try multiplying the two vectors. You will get an error since Matlab is trying to do Matrix multiplication and is expecting the number of rows in a to equal the number of columns in b. To perform multiplication element by element, you must use a dot with the multiplication operator, ``.*''. This is also true for the division and exponent operator.