||
clc
clear
fnam='./6074_4bottom_q_sig.fig';
id=[1,8,11,12];
xli=[1000 1700];%x 坐标范围
for i=1:length(id)
eval(sprintf('[x%d,y%d]=getdata(fnam,%d);',id(i),id(i),id(i)));
end
figure;plot(x12,y12);xlim(xli);title('data12')
function [x,y]=getdata(fnam,id)
%open('./6074_4bottom_q_sig.fig');
f=open(fnam);
% id=[1,8,11,12];
% xli=[1000 1700];
hl = get(gca,'Children');
% ha = get(gcf,'Children');
xdata = get(hl,'XData');
ydata = get(hl,'YData');
x0=[]; y0=[];
for i=1:(size(ydata,1))
x0(i,:)=xdata{i,:};
y0(i,:)=ydata{i,:};
end
x0=flipud(x0);
x0=x0(id,:);
y0=flipud(y0);
y0=y0(id,:);
%-----------------------------
plot_id=id;
i2=find(id==plot_id);
x=x0(i2,:);
y=y0(i2,:);
close(f);
end
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-25 12:41
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社