title: how to multiply each element of A as a scalar to B
body: <p>given a vector and matrix A and B, how to multiply each element of A as a scalar to B then add up each of the new matrix, without using a for loop.</p>
  
  <p>What i mean is:</p>
  
  <pre><code>A = [1;2;3]
  B = [1 2;3 4 ;5 6] 
  
  C = (A(1) * B) + (A(2) * B) + (A(3) * B)
  
  ans =
  
   6    12
  18    24
  30    36
  
  C = sum(C)
  C =
  
  54    72
  </code></pre>
  
  <p>but I can't do it manually because the vector is too long.</p>