【发布时间】:2014-04-06 06:45:38
【问题描述】:
让我们考虑下面的代码
function [order]=find_order(y,fs);
order=0;
n=length(y);
n1=nextpow2(n);
ndft=2^n1;
for i=1:floor(n/2)
[Pxx,f]=pburg(y,i,ndft,fs);
% subplot(floor(n/2),floor(n/2),i);
%subplot(ndft,ndft,i);
h = figure;
plot(f,Pxx);
title(['order',num2str(i),'i']);
filename = 'mydata';
print(h, '-dpsc', filename);
order(i)=i;
pause(6.21);
end
end
我有一个问题想要而不是在每次迭代时绘制新图,用新图替换旧图,那么我该怎么做呢?请帮助我
【问题讨论】: