close all;
clear;

casename = 'Case_A.mat';
load(casename); 
[m,n]=size(velocities(1).u);

N = length(velocities);

elapse_time = 0;
vs = 0.15;      % Vector plot scale factor

xb=[0.9 2.5 2.5 0.9];   %Vector legend bounding box
yb=[6.2 6.2 6.8 6.8];

figure(1);
set(gcf,'position',[100 100 600 590]);

for i=1:N
    u = velocities(i).u;
    w = velocities(i).w;
    quiver(x,z,u*vs,w*vs,0,'b');
    
    hold on;
    fill(xb,yb,'w')
    quiver(1, 6.5, 3*vs,0*vs,0,'b');
    h=text(1.6, 6.55, '3 cm/s');
    set(h,'fontsize',12);
    hold off;
    
    
    xlabel('{\it x} (cm)','fontsize',15,'fontname','times');
    ylabel('{\it z} (cm)','fontsize',15,'fontname','times');
    title_text = sprintf('Elapsed time = %d (second)',elapse_time);
    ht = title(title_text);
    set(ht,'fontsize',16,'fontname','times');
    
    axis([-0.5 6.5 -0.5 7.5]);
    pause(0.1);
    
    elapse_time = elapse_time + 1.0;
end

