where are my data?
조회 수: 1 (최근 30일)
이전 댓글 표시
I plot a figure by using a function from a package.
Now I'd like to know the x and y values once I plot the curve.
Where are they stored
댓글 수: 0
채택된 답변
Star Strider
2020년 1월 14일
Try this:
F = openfig('untitled.fig');
ax = gca;
lines = findobj(ax, 'Type','Line');
for k = 1:numel(lines)
x{k,:} = lines(k).XData;
y{k,:} = lines(k).YData;
end
The x- and y-data for each line are in their appropriate cell arrays.
댓글 수: 4
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!