Register to reply 
Draw Lines between Points in MATLAB 
Share this thread: 
#1
Apr1411, 06:54 PM

P: 600

Hi,
I have a matrix V, which is a 5by2 matrix, where each row represents a point in the xyplain. How can I connect these points together in MATLAB, please? Thanks in advance 


#2
Apr1411, 07:41 PM

PF Gold
P: 1,160

plot(V(:,1),V(:,2)) should do it, if I remember my matrix slicing.



#3
Apr1411, 07:45 PM

P: 600

Thanks 


#4
Apr1411, 07:50 PM

PF Gold
P: 1,160

Draw Lines between Points in MATLAB
It only plots three points?
I think you should be able to get a connected graph by appending the start point onto the matrix (getting a 6x2) and then using plot. 


#5
Apr1411, 08:02 PM

P: 600




#7
Apr1411, 08:17 PM

P: 600




#8
Apr1411, 08:20 PM

PF Gold
P: 1,160

You should probably be able to do something similar with plot3() for lines in R^{3}.



#9
Apr1411, 10:47 PM

P: 600




#11
Apr1411, 11:01 PM

P: 600

Thanks 


#12
Apr1411, 11:24 PM

PF Gold
P: 1,160

You may have to break the matrix up into matrices such that plot3 will produce the lines connected the way you want.
Another option is to look on the file exchange and see if there's anything you can use there. http://www.mathworks.com/matlabcentral/fileexchange/ 


#13
Apr1511, 11:09 AM

P: 600




Register to reply 
Related Discussions  
Draw a simpl graph in matlab  Math & Science Software  2  
Points, Lines, and Planes in 3D Space! Given 3 points find a plane...  Calculus & Beyond Homework  10  
How can I draw graphs for the equation on matlab  Math & Science Software  1  
Points and lines  Introductory Physics Homework  1  
Two lines intersect at three points?  General Math  2 