help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: function for plotting a line between any two points (x1,y1)


From: Ted Harding
Subject: RE: function for plotting a line between any two points (x1,y1)
Date: Mon, 18 Jun 2001 11:53:04 +0100 (BST)

On 18-Jun-01 Arvind Raman wrote:
> Hi all,
> Is there a function in matlab which helps you plot lines between two
> points (x1,y1) and (x2,y2).
> 
> I have a 2D matrix like 
> [ x1, y1; x2,y2; x3;y3; x4;y4; x5;y5]
> 
> I want to draw a line between (x1,y1) and (x2,y2) ; (x2,y2) and (x3,y3)
> ; (x3,y3) and (x4,y4) and so on..

Suppose

  X = [ x1, y1; x2,y2; x3;y3; x4;y4; x5;y5];

Then

  plot(X(:,1),X(:,2),"-")

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 18-Jun-01                                       Time: 11:53:04
------------------------------ XFMail ------------------------------



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]