function [wind]=collect_total_wind(deb,fin)
files=dir('C:\Documents and Settings\sylvie lorsolo\My Documents\research\isabel\data\total_wind\*.dat');
u_comp=[];
v_comp=[];
ws=[];
wd1=[];
for j=deb:fin
    filename=files(j).name;
    mean_wind=load(['C:\Documents and Settings\sylvie lorsolo\My Documents\research\isabel\data\total_wind\',filename]);
    
    
    wd=mean_wind(:,2);
    
    for i=1:600
        ang(i)=deg2rad(wd(i));
        
        
        if ang(i)<=pi/2
            u(i)=-sin(ang(i));
            v(i)=-cos(ang(i));
            
            
        elseif ang(i) > pi/2 & ang(i) <= pi
            ang(i)=ang(i)-pi/2;
            u(i)=-cos(ang(i));
            v(i)=sin(ang(i));
            
        elseif ang(i) > pi & ang(i) <= 3*pi/2
            ang(i)=ang(i)-pi;
            u(i)=sin(ang(i));
            v(i)=cos(ang(i));
            
        elseif ang(i) > 3*pi/2 & ang(i) <=2* pi
            ang(i)=ang(i)-3*pi/2;
            u(i)=cos(ang(i));
            v(i)=-sin(ang(i));
        else
            u(i)=NaN;
            v(i)=NaN;
            
        end
    end
    u=u';
               size(u);
               
               v=v';
               size(v);
               u_comp=[u_comp u];
               v_comp=[v_comp v];
               ws=[ws mean_wind(:,1)];
               wd1=[wd1 mean_wind(:,2)];
               clear('u','v')
           end
           wind.u=u_comp;
           wind.v=v_comp;
           wind.ws=ws;
           wind.wd=wd1;
           