title: Vector to Matrix syntax in MATLAB
body: <p>Is there a way to combine 2 vectors in MATLAB such that:</p>
  
  <pre><code>mat = zeros(length(C),length(S));
  for j=1:length(C)
      mat(j,:)=C(j)*S;
  end
  </code></pre>
  
  <p>Using normal MATLAB syntax similar to:</p>
  
  <pre><code>mat = C * S(1:length(S))
  </code></pre>
  
  <p>This gives a "Inner matrix dimensions must agree error" because it's trying to do normal matrix operations.  This is not a standard Linear Algebra operation so I'm not sure how to correctly express it in MATLAB, but it seems like it should be possible without requiring a loop, which is excessively slow in MATLAB.</p>