Extracting data from a graph image using 'ginput'
5 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I want to extract data using 'ginput' from an attached file.
採用された回答
Vishal Gaur
2020 年 7 月 1 日
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.
その他の回答 (1 件)
darova
2020 年 7 月 2 日
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)))
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!