%desfase entre series a ~800 m y en superficie
clear
load freadcpv26
load frey126
adcpv=freadcpv26; a=adcpv(121:end);
%a=frey126;%(150:end);
load frey226
b=frey226(121:end);
load fren226
c=fren226(121:end);
for i=1:50
   %ccc=corrcoef(atubod(i:end),aajusted(1:end+1-i));
   %c(i)=ccc(2,1);
   ccc2=corrcoef(a(1:end+1-i),b(i:end));
   c2(i)=ccc2(2,1);

end
load fre35
load fres126
load freadcpv26 
%a26=freadcpv26;
%a26=frey126
figure(1)
subplot(2,1,1)
plot(c2)
subplot(2,1,2)
plot(a,'r')
hold on
plot(b,'b')
hold on
plot(c,'g')
figure(2)
plot(a26,'r')
hold on
plot(fre35(121:end),'b')
hold on
plot(fres126(121:end),'g')

load fre65
load freadcpv65
a65=freadcpv65(1:end-1);
load fres165
figure(3)
plot(a65,'r')
hold on
plot(fre65,'b')
hold on
plot(fres165,'g')

addpath /Francia/Velocidades
addpath /Francia/Estadisticas %aqui esta nanmean
load S1v
load N1v
load Y1v
load uvmoy
v=uvmoy(4,378:end)';v=completo_series1(v,5);
v=v(122:end-1);

s=S1v(121:end);
n=N1v(121:end);
%vv=v(175:275);
e=Y1v;
for i=1:50
   %ccc=corrcoef(atubod(i:end),aajusted(1:end+1-i));
   %c(i)=ccc(2,1);
   aaa2=corrcoef(v(1:end+1-i),e(i:end));
   a2(i)=aaa2(2,1);

end
figure
plot(v,'b')
hold on
plot(s,'g')
hold on
plot(e,'r')
figure
plot(a2)
