Digital Signal Processing Reference
In-Depth Information
ans =
80
4
36
64
>> sum(A*4)
ans =
184
When it comes to multiplying matrices with arrays, the results are as one would
expect from linear algebra.
>> [1 2 3]*C % Multiply row vector [1 2 3] by C
% result(1) = 0*1 + 4*2 + 8*3
% result(2) = 1*1 + 5*2 + 9*3
% result(3) = 2*1 + 6*2 + 10*3
% result(4) = 3*1 + 7*2 + 11*3
% Results are all in 1 row.
ans =
32
38
44
50
>> C*[1 2 3 4]. % Multiply C by [1 2 3 4] as a column vector
% result(1) = 0*1 + 1*2 + 2*3 + 3*4
% result(2) = 4*1 + 5*2 + 6*3 + 7*4
% result(3) = 8*1 + 9*2 + 10*3 + 11*4
% Results are all in 1 column.
ans =
20
60
100
There are several dierent ways to multiply F and C. Trying F*C does not work,
because the dimensions are not correct. If F or C is transposed, then there is no
Search WWH ::




Custom Search