open('运行结果.fig');
lh = findall(gca, 'type', 'line');% 如果图中有多条曲线,lh为一个数组
xc = get(lh, 'xdata'); % 取出x轴数据,xc是一个元胞数组
yc = get(lh, 'ydata'); % 取出y轴数据,yc是一个元胞数组
figure(2)
for i=1:length(xc)
plot(xc{i},yc{i}/max(yc{i}));
hold on;
end
提取MATLAB fig的数据
于 2022-04-19 20:31:14 首次发布