title: Draw a line through two points
body: <p>Using MatLab, I know how to create a line <em>segment</em> connecting two points using this code:</p>
  
  <pre><code>line([0 1],[0 1])
  </code></pre>
  
  <p>This draws a straight line segment from the point (0,0) to the point (1,1).</p>
  
  <p>What I am trying to do is continue that line to the edge of the plot.  Rather than just drawing a line between these two points I want to draw a line <em>through</em> those two points that spans the entire figure for any set of two points.</p>
  
  <p>For this particular line and a x=-10:10, y=-10:10 plot I could write:</p>
  
  <pre><code>line([-10 10], [-10 10]);
  </code></pre>
  
  <p>But I would need to generalize this for any set of points.</p>