hurricane='frances';
rep1='total_wind';
rep2='total_wind\fourier';
diff_wd=[];;
diff_ws=[];
 files=dir(['C:\Documents and Settings\sylvie lorsolo\My Documents\research\',hurricane,'\data\',rep2,'\*.dat']);
 for fil=2:23
    four=load(['C:\Documents and Settings\sylvie lorsolo\My Documents\research\',hurricane,'\data\',rep2,'\',files(fil).name]);
    sinus=load(['C:\Documents and Settings\sylvie lorsolo\My Documents\research\',hurricane,'\data\',rep1,'\',files(fil).name]);
    sinus=sinus(1:length(four),:);
    temp_wd=abs(four(:,2)-sinus(:,2));
    temp_ws=abs(four(:,1)-sinus(:,1));
    diff_wd=[diff_wd;temp_wd];
    diff_ws=[diff_ws;temp_ws];
end
u=find(diff_wd>180);
if length(u)>1
    diff_wd(u)=360-diff_wd(u);
end