Borrar filtros
Borrar filtros

make dot and count them

2 visualizaciones (últimos 30 días)
Rahma Yeni
Rahma Yeni el 12 de Abr. de 2012
how to make dots (points) in an axes and count them.. may I use "ginput".. how i can make it..?? thank you.. ^^
  4 comentarios
Rahma Yeni
Rahma Yeni el 12 de Abr. de 2012
I would prefer to explain it in pictures
http://www.flickr.com/photos/rye_ni/7070715047/
thank you before.. ^^
Jan
Jan el 12 de Abr. de 2012
How do you "make some dots in an axes"? Isn't it possible to count the dots during creation already?

Iniciar sesión para comentar.

Respuesta aceptada

Thomas
Thomas el 12 de Abr. de 2012
Is this what you want
E.G.
close all
clear variables %changed from clear all on Jan's suggestion
disp('Hit return (enter) to stop entering points');
[x,y]=ginput; % hit return(enter) to stop entering points
plot(x,y,'MarkerFaceColor',[0 0 0],'MarkerEdgeColor',[0 0 0],'Marker','o','LineStyle','none');
num_points=(length(x))
  6 comentarios
Jan
Jan el 12 de Abr. de 2012
@Thomas, I would not have mentioned the problems of "clear all", if this appears less frequently in this forum. It does not cause any problems in your example. But I see it in so many examples, even as first line inside functions -where it is even weird-, that I suggest repeatedly to avoid it. A lot of FEX submissions contain "clear all, close all" and testing them can destroy my current work.
Rahma Yeni
Rahma Yeni el 13 de Abr. de 2012
Thank you all..
i can applied the code to my problem.. ^^

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Object Programming en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by