where are my data?
2 次查看(过去 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 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!