how i print figure in a loop?
Afficher commentaires plus anciens
i made a pcolor figure animation using a loop. i want to print each figure as jpg file. please help me
code: clc; clear; load('SSHA_all_199301-201202.mat') lon=SSHA.lon; lat=SSHA.lat; time=SSHA.time; ssha=SSHA.data;
[x y]=meshgrid(lon,lat); str=datestr(time,'mm-yyyy');
for n=1:length(time)
pcolor(x,y,ssha(:,:,n));
shading interp
colorbar
caxis([-40 40])
title(str(n,:))
pause(0.01)
end
Réponses (1)
Image Analyst
le 9 Juin 2015
0 votes
See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_save_my_figure.2C_axes.2C_or_image.3F_I.27m_having_trouble_with_the_built_in_MATLAB_functions. and use export_fig().
1 commentaire
Image Analyst
le 9 Juin 2015
Also, see my attached demo.
Catégories
En savoir plus sur Animation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!