Extracting data from a graph image using 'ginput'
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Changho LEE
il 30 Giu 2020
Commentato: Changho LEE
il 3 Lug 2020
Hello,
I want to extract data using 'ginput' from an attached file.
Risposta accettata
Vishal Gaur
il 1 Lug 2020
Hi Changho LEE,
Firstly, you have to digitize your graph. You can find many methods on File Exchange - https://www.mathworks.com/matlabcentral/fileexchange/?term=digitize&sort=ratings_desc
Then you can use ginput.
Più risposte (1)
darova
il 2 Lug 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)))
Vedere anche
Categorie
Scopri di più su Data Exploration in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!