ktl014
6/12/2017 - 4:55 AM

matrix-vector multiplication - produces sum

matrix-vector multiplication

  • produces sum
Q = reshape(1:10,5,2)         % creates a matrix for testing
v = [1;2]                     % creates a vector for testing
Q*v                           % the product of a matrix and a vector
sum(Q*v)                      % the sum of that vector