Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Surface current animation using quiver2
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
jothi

Posts: 15
Registered: 3/16/11
Surface current animation using quiver2
Posted: Jul 31, 2013 12:23 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi matlab users, I am trying to make a surface current animation in GUI.The GUI contains the map in axes1 and the location of stations are updated with plot command and axes hold is on;here i made axes1 property hold is on,because in axes1 first map appears and the station locations has appears for identifications.

The total data sets may be the 10 hours,each hour data is a single file having longitude,latitude,u,v.when i am trying to plot the current using quiver2 in axes1 the first hour data plots appears well, and the next hours datas are overlapping with the same plot due to the axes1 hold is on;If i make hold to off,only the current appears, the map and the station locations are disappears. is any solution to plot surface current one by one with out overlapping?

Here I given my code.. ...

image([-180 180], [90 -90],map); hold on; plot(long2(:,1),lat2(:,1),'^g','MarkerFaceColor','g','MarkerSize',12); ... for xx=1:hrs_diff

zz=[datestr(from_da2,'yyyy-mm-dd HH') '*'];

dt_loc=strfndw(ttt(:,5),zz);
from_da2=addtodate(from_da2,1,'Hour');
len_dt_loc=length(dt_loc);
for xc=1:len_dt_loc
pl_lon(xc,1)=ttt(dt_loc(xc),1);
pl_lat(xc,1)=ttt(dt_loc(xc),2);
pl_ucomp(xc,1)=ttt(dt_loc(xc),3);
pl_vcomp(xc,1)=ttt(dt_loc(xc),4);
pl_dtm(xc,1)=ttt(dt_loc(xc),5);
end

quiver2(pl_lon(:,1),pl_lat(:,1),pl_ucomp(:,1),pl_vcomp(:,1),'n=',0.03);
pause(0.2); end



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.