title: how to plot the projection of a vector?
body: <p>I have made the following program for calculating the vector projection:</p>
  
  <pre><code>a=[6 7]
  b=[1 4]
  p=(dot(a,b)/(b*b'))*b
  </code></pre>
  
  <p>the result of p is [2 8] that is the projection of a on b.</p>
  
  <p>I read that for plotting a vector in Matlab I should choose some origin points, so I have added those to the vectors and form a set of matrices with them like this:</p>
  
  <pre><code>x=[0 0; 6 7]
  y=[0 0; 1 4]
  z=[0 0; 2 8]
  plot3(x,y,z)
  grid;
  </code></pre>
  
  <p>but I cannot get to visualize the projection, what am I missing?</p>
  
  <p>Thanks</p>