Effacer les filtres
Effacer les filtres

How to show the coordinate automatically after plot the marker?

2 vues (au cours des 30 derniers jours)
Nurul Najmah
Nurul Najmah le 2 Mai 2015
this is the code
true
%point location
row=find(sum(img8,2)==0,1,'last')+1;
col=find(img8(row,:)~=0);
row=row(ones(size(col)));
Points=[row(:) col(:)];
imshow(img8);
title('Highest Point Location')
hold on
plot(Points(:,2),Points(:,1),'rp','MarkerSize',10)

Réponse acceptée

the cyclist
the cyclist le 2 Mai 2015
Do you mean you want a label near the plotted point? You could use the text command, using your Points variable to place it:
text(Points(1,2),Points(1,1),['This is (',num2str(Points(1,2)),',',num2str(Points(1,1)),')'])
You would then need to loop over your points.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by