This will put the title of each frame as k=1
, k=2
etc. and will print each frame as an eps file to Frame1.eps
, Frame2.eps
, etc.
function []=AR_simulate(p,fs);
B=xlsread('data_generations1','A1','g8:g301');
for k=1:1:p
[pxx,f]=pyulear(B,k);
subplot(1,2,1)
plot(f,pxx);
F(k) = getframe;
title(['k=' num2str(k)])
subplot(1,2,2)
% 2nd plot
print('-depsc2',['Frame' num2str(k) '.eps')
end
movie(F,100);
end
You can also use text instead of title to place the text anywhere on the plot.