Extracting data from a graph image using 'ginput'
이전 댓글 표시
Hello,
I want to extract data using 'ginput' from an attached file.

채택된 답변
추가 답변 (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)))
카테고리
도움말 센터 및 File Exchange에서 Data Exploration에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
