Getting data from a Graph
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I'm currently studding a bubble colapse problem with Matlab. I got a graph but I want to know how can I get a Matrix or a Table (.txt or some similar type of file) with all the data from the graph. I mean, in the left will be the velocity and in the right the time correspondent to that velocity. I apologize if someone else has already asked this question but I didn't find a similar topic.
Thanks in advance.
답변 (2개)
Walter Roberson
2013년 4월 8일
I will have to guess that it is a line plot. If so then,
h = findobj(gca, 'type', line);
x = get(h, 'xdata');
y = get(h, 'ydata');
After that,
fid = fopen('OutputFile.txt', 'wt');
fprintf(fid, '%g %g\n', [x(:), y(:)].' );
fclose(fid);
댓글 수: 0
Image Analyst
2013년 4월 8일
Not sure if this is what you're looking for or not: http://www.mathworks.com/matlabcentral/fileexchange/36904-matlab-script-for-digitizing-a-published-graph
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!