English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
When multiplying a vector by a number, this is calledScalar MultiplicationScalar multiplication produces a new vector of the same type, with each element of the original vector multiplied by a number.
Create a script file using the following code-
v = [ 12 34 10 8]; m = 5 * v
When running the file, it displays the following results-
m = 60 170 50 40
Please note that you can perform all scalar operations on vectors. For example, you can add, subtract, and divide vectors by scalars.