function [spb] = SPB_var(x,y);
% x = nino34;
% y = wwv;

[mx,nx] = size(x);
if (mx==1);
x=x';
end;

[mx,nx] = size(y);
if (mx==1);
y=y';
end;

% spb(t,i) (Start month, Lead time)
for t=1:12
for i=1:13
    a = y(t:12:end);
    b = x((t-1)+i:12:end);
    if length(a)>length(b);a = a(1:end-1);end
    spb(t,i) = corr(a,b);
end
end

