%% All graphs
% 1 floater 2 pts
ls;
load obs_float_test.dat;
whos;
obs_float_test (:,:)
x=obs_float_test (1:2:16,4)
y=obs_float_test (2:2:16,4)
x=x+1
y=y+1
for p=1:16
    figure (p)
   plot(x(1),y(1),'+')
   hold on;
   plot(x(8),y(8),'>')
   hold on;
   plot(x(1:8),y(1:8),'+')
   hold on;
   plot(x(1:8),y(1:8),'-r')
   hold on;
end 

load r_float_optim25float-filtre15-inc_1.dat;
whos;
r_float_optim25float_filtre15_inc_1(:,:)
x1=r_float_optim25float_filtre15_inc_1(1:2:44,4)
y1=r_float_optim25float_filtre15_inc_1(2:2:44,4)
x1=x1+1
y1=y1+1
figure(1)
plot(x1(1),y1(1),'+')
hold on;
plot(x1(22),y1(22),'>')
hold on;
plot(x1(1:22),y1(1:22),'+')
plot(x1(1:22),y1(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_2.dat;
whos;
r_float_optim25float_filtre15_inc_2(:,:)
x2=r_float_optim25float_filtre15_inc_2(1:2:44,4)
y2=r_float_optim25float_filtre15_inc_2(2:2:44,4)
x2=x2+1
y2=y2+1
figure(2)
plot(x2(1),y2(1),'+')
hold on;
plot(x2(22),y2(22),'>')
hold on;
plot(x2(1:22),y2(1:22),'+')
plot(x2(1:22),y2(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_3.dat;
whos;
r_float_optim25float_filtre15_inc_3(:,:)
x3=r_float_optim25float_filtre15_inc_3(1:2:44,4)
y3=r_float_optim25float_filtre15_inc_3(2:2:44,4)
x3=x3+1
y3=y3+1
figure(3)
plot(x3(1),y3(1),'+')
hold on;
plot(x3(22),y3(22),'>')
hold on;
plot(x3(1:22),y3(1:22),'+')
plot(x3(1:22),y3(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_4.dat;
whos;
r_float_optim25float_filtre15_inc_4(:,:)
x4=r_float_optim25float_filtre15_inc_4(1:2:44,4)
y4=r_float_optim25float_filtre15_inc_4(2:2:44,4)
x4=x4+1
y4=y4+1
figure(4)
plot(x4(1),y4(1),'+')
hold on;
plot(x4(22),y4(22),'>')
hold on;
plot(x4(1:22),y4(1:22),'+')
plot(x4(1:22),y4(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_5.dat;
whos;
r_float_optim25float_filtre15_inc_5(:,:)
x5=r_float_optim25float_filtre15_inc_5(1:2:44,4)
y5=r_float_optim25float_filtre15_inc_5(2:2:44,4)
x5=x5+1
y5=y5+1
figure(5)
plot(x5(1),y5(1),'+')
hold on;
plot(x5(22),y5(22),'>')
hold on;
plot(x5(1:22),y5(1:22),'+')
plot(x5(1:22),y5(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_6.dat;
whos;
r_float_optim25float_filtre15_inc_6(:,:)
x6=r_float_optim25float_filtre15_inc_6(1:2:44,4)
y6=r_float_optim25float_filtre15_inc_6(2:2:44,4)
x6=x6+1
y6=y6+1
figure(6)
plot(x6(1),y6(1),'+')
hold on;
plot(x6(22),y6(22),'>')
hold on;
plot(x6(1:22),y6(1:22),'+')
plot(x6(1:22),y6(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_7.dat;
whos;
r_float_optim25float_filtre15_inc_7(:,:)
x7=r_float_optim25float_filtre15_inc_7(1:2:44,4)
y7=r_float_optim25float_filtre15_inc_7(2:2:44,4)
x7=x7+1
y7=y7+1
figure(7)
plot(x7(1),y7(1),'+')
hold on;
plot(x7(22),y7(22),'>')
hold on;
plot(x7(1:22),y7(1:22),'+')
plot(x7(1:22),y7(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_8.dat;
whos;
r_float_optim25float_filtre15_inc_8(:,:)
x8=r_float_optim25float_filtre15_inc_8(1:2:44,4)
y8=r_float_optim25float_filtre15_inc_8(2:2:44,4)
x8=x8+1
y8=y8+1
figure(8)
plot(x8(1),y8(1),'+')
hold on;
plot(x8(22),y8(22),'>')
hold on;
plot(x8(1:22),y8(1:22),'+')
plot(x8(1:22),y8(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_9.dat;
whos;
r_float_optim25float_filtre15_inc_9(:,:)
x9=r_float_optim25float_filtre15_inc_9(1:2:44,4)
y9=r_float_optim25float_filtre15_inc_9(2:2:44,4)
x9=x9+1
y9=y9+1
figure(9)
plot(x9(1),y9(1),'+')
hold on;
plot(x9(22),y9(22),'>')
hold on;
plot(x9(1:22),y9(1:22),'+')
plot(x9(1:22),y9(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_10.dat;
whos;
r_float_optim25float_filtre15_inc_10(:,:)
x10=r_float_optim25float_filtre15_inc_10(1:2:44,4)
y10=r_float_optim25float_filtre15_inc_10(2:2:44,4)
x10=x10+1
y10=y10+1
figure(10)
plot(x10(1),y10(1),'+')
hold on;
plot(x10(22),y10(22),'>')
hold on;
plot(x10(1:22),y10(1:22),'+')
plot(x10(1:22),y10(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_11.dat;
whos;
r_float_optim25float_filtre15_inc_11(:,:)
x11=r_float_optim25float_filtre15_inc_11(1:2:44,4)
y11=r_float_optim25float_filtre15_inc_11(2:2:44,4)
x11=x11+1
y11=y11+1
figure(11)
plot(x11(1),y11(1),'+')
hold on;
plot(x11(22),y11(22),'>')
hold on;
plot(x11(1:22),y11(1:22),'+')
plot(x11(1:22),y11(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_12.dat;
whos;
r_float_optim25float_filtre15_inc_12(:,:)
x12=r_float_optim25float_filtre15_inc_12(1:2:44,4)
y12=r_float_optim25float_filtre15_inc_12(2:2:44,4)
x12=x12+1
y12=y12+1
figure(12)
plot(x12(1),y12(1),'+')
hold on;
plot(x12(22),y12(22),'>')
hold on;
plot(x12(1:22),y12(1:22),'+')
plot(x12(1:22),y12(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_13.dat;
whos;
r_float_optim25float_filtre15_inc_13(:,:)
x13=r_float_optim25float_filtre15_inc_13(1:2:44,4)
y13=r_float_optim25float_filtre15_inc_13(2:2:44,4)
x13=x13+1
y13=y13+1
figure(13)
plot(x13(1),y13(1),'+')
hold on;
plot(x13(22),y13(22),'>')
hold on;
plot(x13(1:22),y13(1:22),'+')
plot(x13(1:22),y13(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_14.dat;
whos;
r_float_optim25float_filtre15_inc_14(:,:)
x14=r_float_optim25float_filtre15_inc_14(1:2:44,4)
y14=r_float_optim25float_filtre15_inc_14(2:2:44,4)
x14=x14+1
y14=y14+1
figure(14)
plot(x14(1),y14(1),'+')
hold on;
plot(x14(22),y14(22),'>')
hold on;
plot(x14(1:22),y14(1:22),'+')
plot(x14(1:22),y14(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_15.dat;
whos;
r_float_optim25float_filtre15_inc_15(:,:)
x15=r_float_optim25float_filtre15_inc_15(1:2:44,4)
y15=r_float_optim25float_filtre15_inc_15(2:2:44,4)
x15=x15+1
y15=y15+1
figure(15)
plot(x15(1),y15(1),'+')
hold on;
plot(x15(22),y15(22),'>')
hold on;
plot(x15(1:22),y15(1:22),'+')
plot(x15(1:22),y15(1:22),'g')
hold on;
ls;

load r_float_optim25float-filtre15-inc_16.dat;
whos;
r_float_optim25float_filtre15_inc_16(:,:)
x16=r_float_optim25float_filtre15_inc_16(1:2:44,4)
y16=r_float_optim25float_filtre15_inc_16(2:2:44,4)
x16=x16+1
y16=y16+1
figure(16)
plot(x16(1),y16(1),'+')
hold on;
plot(x16(22),y16(22),'>')
hold on;
plot(x16(1:22),y16(1:22),'+')
plot(x16(1:22),y16(1:22),'g')
hold on;
ls;

% load r_float_optim25float-filtre15-inc_17.dat;
% whos;
% r_float_optim25float_filtre15_inc_17(:,:)
% x17=r_float_optim25float_filtre15_inc_17(1:2:44,4)
% y17=r_float_optim25float_filtre15_inc_17(2:2:44,4)
% x17=x17+1
% y17=y17+1
% figure(17)
% plot(x17(1),y17(1),'+')
% hold on;
% plot(x17(22),y17(22),'>')
% hold on;
% plot(x17(1:22),y17(1:22),'+')
% plot(x17(1:22),y17(1:22),'g')
% hold on;
% ls;
% 
% load r_float_optim25float-filtre15-inc_18.dat;
% whos;
% r_float_optim25float_filtre15_inc_18(:,:)
% x18=r_float_optim25float_filtre15_inc_18(1:2:44,4)
% y18=r_float_optim25float_filtre15_inc_18(2:2:44,4)
% x18=x18+1
% y18=y18+1
% figure(18)
% plot(x18(1),y18(1),'+')
% hold on;
% plot(x18(22),y18(22),'>')
% hold on;
% plot(x18(1:22),y18(1:22),'+')
% plot(x18(1:22),y18(1:22),'g')
% hold on;
% ls;
% 
% load r_float_optim25float-filtre15-inc_19.dat;
% whos;
% r_float_optim25float_filtre15_inc_19(:,:)
% x19=r_float_optim25float_filtre15_inc_19(1:2:44,4)
% y19=r_float_optim25float_filtre15_inc_19(2:2:44,4)
% x19=x19+1
% y19=y19+1
% figure(19)
% plot(x19(1),y19(1),'+')
% hold on;
% plot(x19(22),y19(22),'>')
% hold on;
% plot(x19(1:22),y19(1:22),'+')
% plot(x19(1:22),y19(1:22),'g')
% hold on;
% ls;
% 
% load r_float_optim25float-filtre15-inc_20.dat;
% whos;
% r_float_optim25float_filtre15_inc_20(:,:)
% x20=r_float_optim25float_filtre15_inc_20(1:2:44,4)
% y20=r_float_optim25float_filtre15_inc_20(2:2:44,4)
% x20=x20+1
% y20=y20+1
% figure(20)
% plot(x20(1),y20(1),'+')
% hold on;
% plot(x20(22),y20(22),'>')
% hold on;
% plot(x20(1:22),y20(1:22),'+')
% plot(x20(1:22),y20(1:22),'g')
% hold on;
% ls;
% 
% load r_float_optim25float-filtre15-inc_21.dat;
% whos;
% r_float_optim25float_filtre15_inc_21(:,:)
% x21=r_float_optim25float_filtre15_inc_21(1:2:44,4)
% y21=r_float_optim25float_filtre15_inc_21(2:2:44,4)
% x21=x21+1
% y21=y21+1
% figure(21)
% plot(x21(1),y21(1),'+')
% hold on;
% plot(x21(22),y21(22),'>')
% hold on;
% plot(x21(1:22),y21(1:22),'+')
% plot(x21(1:22),y21(1:22),'g')
% hold on;
% ls;
% 
% load r_float_optim25float-filtre15-inc_22.dat;
% whos;
% r_float_optim25float_filtre15_inc_22(:,:)
% x22=r_float_optim25float_filtre15_inc_22(1:2:44,4)
% y22=r_float_optim25float_filtre15_inc_22(2:2:44,4)
% x22=x22+1
% y22=y22+1
% figure(22)
% plot(x22(1),y22(1),'+')
% hold on;
% plot(x22(22),y22(22),'>')
% hold on;
% plot(x22(1:22),y22(1:22),'+')
% plot(x22(1:22),y22(1:22),'g')
% hold on;
% ls;

load uoptim25float-filtre15-inc1.dat;
whos;
X=uoptim25float_filtre15_inc1(:,end-2);
Y=uoptim25float_filtre15_inc1(:,end-1);
U=uoptim25float_filtre15_inc1(:,end);
ls;
load voptim25float-filtre15-inc1.dat;
whos;
V=voptim25float_filtre15_inc1(:,end);
figure(1)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc2.dat;
whos;
X=uoptim25float_filtre15_inc2(:,end-2);
Y=uoptim25float_filtre15_inc2(:,end-1);
U=uoptim25float_filtre15_inc2(:,end);
ls;
load voptim25float-filtre15-inc2.dat;
whos;
V=voptim25float_filtre15_inc2(:,end);
figure(2)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc3.dat;
whos;
X=uoptim25float_filtre15_inc3(:,end-2);
Y=uoptim25float_filtre15_inc3(:,end-1);
U=uoptim25float_filtre15_inc3(:,end);
ls;
load voptim25float-filtre15-inc3.dat;
whos;
V=voptim25float_filtre15_inc3(:,end);
figure(3)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc4.dat;
whos;
X=uoptim25float_filtre15_inc4(:,end-2);
Y=uoptim25float_filtre15_inc4(:,end-1);
U=uoptim25float_filtre15_inc4(:,end);
ls;
load voptim25float-filtre15-inc4.dat;
whos;
V=voptim25float_filtre15_inc4(:,end);
figure(4)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc5.dat;
whos;
X=uoptim25float_filtre15_inc5(:,end-2);
Y=uoptim25float_filtre15_inc5(:,end-1);
U=uoptim25float_filtre15_inc5(:,end);
ls;
load voptim25float-filtre15-inc5.dat;
whos;
V=voptim25float_filtre15_inc5(:,end);
figure(5)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc6.dat;
whos;
X=uoptim25float_filtre15_inc6(:,end-2);
Y=uoptim25float_filtre15_inc6(:,end-1);
U=uoptim25float_filtre15_inc6(:,end);
ls;
load voptim25float-filtre15-inc6.dat;
whos;
V=voptim25float_filtre15_inc6(:,end);
figure(6)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc7.dat;
whos;
X=uoptim25float_filtre15_inc7(:,end-2);
Y=uoptim25float_filtre15_inc7(:,end-1);
U=uoptim25float_filtre15_inc7(:,end);
ls;
load voptim25float-filtre15-inc7.dat;
whos;
V=voptim25float_filtre15_inc7(:,end);
figure(7)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc8.dat;
whos;
X=uoptim25float_filtre15_inc8(:,end-2);
Y=uoptim25float_filtre15_inc8(:,end-1);
U=uoptim25float_filtre15_inc8(:,end);
ls;
load voptim25float-filtre15-inc8.dat;
whos;
V=voptim25float_filtre15_inc8(:,end);
figure(8)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc9.dat;
whos;
X=uoptim25float_filtre15_inc9(:,end-2);
Y=uoptim25float_filtre15_inc9(:,end-1);
U=uoptim25float_filtre15_inc9(:,end);
ls;
load voptim25float-filtre15-inc9.dat;
whos;
V=voptim25float_filtre15_inc9(:,end);
figure(9)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc10.dat;
whos;
X=uoptim25float_filtre15_inc10(:,end-2);
Y=uoptim25float_filtre15_inc10(:,end-1);
U=uoptim25float_filtre15_inc10(:,end);
ls;
load voptim25float-filtre15-inc10.dat;
whos;
V=voptim25float_filtre15_inc10(:,end);
figure(10)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc11.dat;
whos;
X=uoptim25float_filtre15_inc11(:,end-2);
Y=uoptim25float_filtre15_inc11(:,end-1);
U=uoptim25float_filtre15_inc11(:,end);
ls;
load voptim25float-filtre15-inc11.dat;
whos;
V=voptim25float_filtre15_inc11(:,end);
figure(11)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc12.dat;
whos;
X=uoptim25float_filtre15_inc12(:,end-2);
Y=uoptim25float_filtre15_inc12(:,end-1);
U=uoptim25float_filtre15_inc12(:,end);
ls;
load voptim25float-filtre15-inc12.dat;
whos;
V=voptim25float_filtre15_inc12(:,end);
figure(12)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc13.dat;
whos;
X=uoptim25float_filtre15_inc13(:,end-2);
Y=uoptim25float_filtre15_inc13(:,end-1);
U=uoptim25float_filtre15_inc13(:,end);
ls;
load voptim25float-filtre15-inc13.dat;
whos;
V=voptim25float_filtre15_inc13(:,end);
figure(13)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc14.dat;
whos;
X=uoptim25float_filtre15_inc14(:,end-2);
Y=uoptim25float_filtre15_inc14(:,end-1);
U=uoptim25float_filtre15_inc14(:,end);
ls;
load voptim25float-filtre15-inc14.dat;
whos;
V=voptim25float_filtre15_inc14(:,end);
figure(14)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc15.dat;
whos;
X=uoptim25float_filtre15_inc15(:,end-2);
Y=uoptim25float_filtre15_inc15(:,end-1);
U=uoptim25float_filtre15_inc15(:,end);
ls;
load voptim25float-filtre15-inc15.dat;
whos;
V=voptim25float_filtre15_inc15(:,end);
figure(15)
quiver(X,Y,U,V,10);

load uoptim25float-filtre15-inc16.dat;
whos;
X=uoptim25float_filtre15_inc16(:,end-2);
Y=uoptim25float_filtre15_inc16(:,end-1);
U=uoptim25float_filtre15_inc16(:,end);
ls;
load voptim25float-filtre15-inc16.dat;
whos;
V=voptim25float_filtre15_inc16(:,end);
figure(16)
quiver(X,Y,U,V,10);

% load uoptim25float-filtre15-inc17.dat;
% whos;
% X=uoptim25float_filtre15_inc17(:,end-2);
% Y=uoptim25float_filtre15_inc17(:,end-1);
% U=uoptim25float_filtre15_inc17(:,end);
% ls;
% load voptim25float-filtre15-inc17.dat;
% whos;
% V=voptim25float_filtre15_inc17(:,end);
% figure(17)
% quiver(X,Y,U,V,10);
% 
% load uoptim25float-filtre15-inc18.dat;
% whos;
% X=uoptim25float_filtre15_inc18(:,end-2);
% Y=uoptim25float_filtre15_inc18(:,end-1);
% U=uoptim25float_filtre15_inc18(:,end);
% ls;
% load voptim25float-filtre15-inc18.dat;
% whos;
% V=voptim25float_filtre15_inc18(:,end);
% figure(18)
% quiver(X,Y,U,V,10);
% 
% load uoptim25float-filtre15-inc19.dat;
% whos;
% X=uoptim25float_filtre15_inc19(:,end-2);
% Y=uoptim25float_filtre15_inc19(:,end-1);
% U=uoptim25float_filtre15_inc19(:,end);
% ls;
% load voptim25float-filtre15-inc19.dat;
% whos;
% V=voptim25float_filtre15_inc19(:,end);
% figure(19)
% quiver(X,Y,U,V,10);
% 
% load uoptim25float-filtre15-inc20.dat;
% whos;
% X=uoptim25float_filtre15_inc20(:,end-2);
% Y=uoptim25float_filtre15_inc20(:,end-1);
% U=uoptim25float_filtre15_inc20(:,end);
% ls;
% load voptim25float-filtre15-inc20.dat;
% whos;
% V=voptim25float_filtre15_inc20(:,end);
% figure(20)
% quiver(X,Y,U,V,10);
% 
% load uoptim25float-filtre15-inc21.dat;
% whos;
% X=uoptim25float_filtre15_inc21(:,end-2);
% Y=uoptim25float_filtre15_inc21(:,end-1);
% U=uoptim25float_filtre15_inc21(:,end);
% ls;
% load voptim25float-filtre15-inc21.dat;
% whos;
% V=voptim25float_filtre15_inc21(:,end);
% figure(21)
% quiver(X,Y,U,V,10);
% 
% load uoptim25float-filtre15-inc22.dat;
% whos;
% X=uoptim25float_filtre15_inc22(:,end-2);
% Y=uoptim25float_filtre15_inc22(:,end-1);
% U=uoptim25float_filtre15_inc22(:,end);
% ls;
% load voptim25float-filtre15-inc22.dat;
% whos;
% V=voptim25float_filtre15_inc22(:,end);
% figure(22)
% quiver(X,Y,U,V,10);

%% comparison of velocities
load uoptim25float-filtre15-inc13.dat
whos
for i=1:3
    iter=find(uoptim25float_filtre15_inc16(:,2)==i);
    U=reshape(uoptim25float_filtre15_inc13(iter,5),58,87);
    figure(1)
    imagesc(U)
    hold on 
    V=reshape(voptim25float_filtre15_inc13(iter,5),58,87);
    imagesc(V)
    i=i+1;
    hold on
end
load uv_total.dat

for i=1:3
    it=find(uv_total(:,1)==i);
    U=reshape(uv_total(it,4),58,87);
    figure(2)
    imagesc(U)
    hold on 
    V=reshape(uv_total(it,5),58,87);
    imagesc(V)
    i=i+1;
    hold on
end