Mercurial > hg > machine-learning-hw7
view drawLine.m @ 6:6d94b2bafcd1 default tip
Replace complicated memory-intensive operation with a faster loop
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Tue, 06 Dec 2011 11:49:32 -0500 |
parents | ded78d0b4987 |
children |
line wrap: on
line source
function drawLine(p1, p2, varargin) %DRAWLINE Draws a line from point p1 to point p2 % DRAWLINE(p1, p2) Draws a line from point p1 to point p2 and holds the % current figure plot([p1(1) p2(1)], [p1(2) p2(2)], varargin{:}); end