For Programmers: Free Programming Magazines  


Home > Archive > Matlab > August 2005 > How i can plot points coordinates?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How i can plot points coordinates?
BoB

2005-08-31, 7:57 am

Hi all,

how i can represent a point in matlab figure together with his (x,y)
coordinates?

i mean that i have a matrix
A=[45 23;102 15; 89 20];

every row are <x> <y> coordinates of points

i make 'plot (A(:,1),A(:,2),'r.');'

but i don' t know how i can display on same graph, neat every point,
its coordinates...

thanks in advance.

Jérôme

2005-08-31, 7:57 am

Hi,

read this :

Paolo, "Draw a graph with coordinates" #, 24 Aug 2005 6:52 am </WebX?50@@.ef11f0d>


Jérôme
BoB

2005-08-31, 7:57 am

thanks a lot J=E9r=F4me

sorry but i still haven' t found the way..

i have read about num2strn and applied to A this way:

T =3D NUM2STR(A)

but i think i missing the last step to solve this issue

text(A(:,1),A(:,2),....

thanks again.

Jérôme

2005-08-31, 7:57 am

A=[45 23;102 15; 89 20];

figure
plot(A(:,1),A(:,2),'r.');
axis([0 150 0 25]);

str=num2str(A);
text(A(:,1)*1.02,A(:,2)*1.02,str);

Jérôme
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com