loops - simulate movie in matlab -


let consider following code

function []=ar_simulate(p,fs); b=xlsread('data_generations1','a1','g8:g301');  k=1:1:p      [pxx,f]=pyulear(b,k);      plot(f,pxx);      f(k) = getframe;  end  movie(f,100); end 

which animates of power spectrum density of given b vector different order,namely order starting @ k=1 , ended k=p,fs sampling frequency. want following thing :i want save each picture somewhere,but on each picture include parameter k,for example @ k=1,there picture,at k=2,there different picture , on,please me how in cycle.thanks in advance

this put title of each frame k=1, k=2 etc. , print each frame eps file frame1.eps, frame2.eps, etc.

function []=ar_simulate(p,fs); b=xlsread('data_generations1','a1','g8:g301');  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 use text instead of title place text anywhere on plot.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -