本文主要是介绍南海流场日变化动态图,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
f3=figure(3);
day=31;
for d=1:dayuu=squeeze(u(:,:,d)); % 252 x 241vv=squeeze(v(:,:,d)); % 252 x 241
% uu=uu';vv=vv';
% 另一种转置方式uu=permute(uu,[2 1 3]);vv=permute(vv,[2 1 3]);m_proj('Miller','lat',[5,25],'lon',[105,125]);t=5;m_quiver(Lon(1:t:end,1:t:end),Lat(1:t:end,1:t:end),uu(1:t:end,1:t:end),vv(1:t:end,1:t:end),5);m_gshhs_i('LineWidth',1,'Color',[0.5 0.5 0.5]);m_grid('box','fancy','YaxisLocation','right','tickdir','in','linestyle','none','fontsize',12);m_text(106,24,[num2str(d) '-Jan-2000'],'fontsize',12,'FontAngle','italic');m_text(106,23,'m/s','fontsize',12,'FontAngle','italic');title(['fluid on Jan ' num2str(d) 'st']);xlabel('Longitude');ylabel('Latitude');drawnowframe=getframe(f3);im{d}=frame2im(frame);
end
file = ‘filename.gif'; % Specify the output file name
for d = 1:day[A,map] = rgb2ind(im{d},256);if d == 1imwrite(A,map,file,'gif','LoopCount',Inf,'DelayTime',1);elseimwrite(A,map,file,'gif','WriteMode','append','DelayTime',1);end
end
这篇关于南海流场日变化动态图的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!