open('6bai.fig');
subplot(2,2,[1,2]);%指定图形
g=findall(gca,'type','line');
xc = get(g, 'xdata'); % 取出x轴数据,xc是一个元胞数组
yc = get(g, 'ydata');
fid=fopen('e:\a.txt','a+');
for i=1:300;
fprintf(fid,'%d,',xc{i,1});
% fpri(fid,'%d )\n',yc{i,1});
end
fprintf(fid,'\r\n\r\n');
for c=1:300;
% fprintf(fid,'(%d ',xc{i,1});
fprintf(fid,'%d,',yc{c,1});
end
fclose(fid);