
Matlab’s command:
>> Z=[], Z=1:3, Z=[], length(Z)
Matlab’s response:
Z =
[]
Z =
1 2 3
Z =
[]
ans =
0
Comments:
Definition of an empty vector.
Empty vector operation is usually used in cases where the user wants to
turn a non-empty vector to an empty one (to reset all the elements of a
vector).
2.1.4 Vector Manipulations Related to Products, Division, and
Powers
Matlab can perform, scalar products (or inner products) and dot products,
as well as dot division and power operations. The only restriction is that the
length of the vectors must be the same. The priorities concerning vector
manipulations is the same as in the case that we use Matlab as a calculator
(power operations first followed by “*” and “/” followed by “+” and “-“)
2.1.4.1 Scalar Product
The scalar product or otherwise termed as inner product, concerns the
multiplication of two equal length vectors. The symbol “*” is used to carry
out this operation. Given a row vector
W
W and a column vector
U
U of length t:
]w...,,w,w[w
t121
= ,
=
t
u
u
u
u
~
M
2
1
Comentarios a estos manuales