Extracting data from a graph image using 'ginput'
Afficher commentaires plus anciens
Hello,
I want to extract data using 'ginput' from an attached file.

1 commentaire
Changho LEE
le 3 Juil 2020
Réponse acceptée
Plus de réponses (1)
darova
le 2 Juil 2020
here is an example
x = rand(100,1); % generate some data
y = rand(100,1);
plot(x,y,'.r')
p = ginput(1);
d = pdist2([x y],p); % find combination of distances
[~,ix] = min(d); % index of closest poont
line(x(ix),y(ix),'linestyle','none','marker','o')
text(x(ix), y(ix),sprintf('%0.1f %0.1f',x(ix), y(ix)))
1 commentaire
Changho LEE
le 3 Juil 2020
Catégories
En savoir plus sur Data Exploration dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
