Scalar Multiplication of Vectors
Example
Create a script file with the following code:
v = [ 12 34 10 8];
m = 5 * v
When you run the file, it displays the following result:
m =
60 170 50 40
Please note that you can perform all scalar operations on vectors. For example, you can add, subtract and divide a vector with a scalar quantity.
No comments:
Post a Comment