 HR=input('enter the horizontal range in meters\n');
%  range=input('enter the range \n');
%  ref_el=input('enter the reference elevation \n');
files=dir(['C:\Documents and Settings\sylvie lorsolo\My Documents\research\frances\data\total_wind\*dat']); 
data_el1=[];
data_el2=[];
data_el3=[];
data_el4=[];
data_el5=[];
data_el6=[];
data_el7=[];
% vol=[];
% for range=1:750
% ele=[0.8;2.2;3.8;5.2;6.8;8.2];
% true_el=[0.75;2.25;3.75;5.25;6.75;8.25];
 ele=[0.5;2;3.5;5;6.5;8;9.5];
 true_el=[0.5;2;3.5;5;6.5;8;9.5];
    for fil=43:length(files);
        sweepfile=files(fil).name;
        el=str2num(sweepfile(30:32));
        total_wind=load(['C:\Documents and Settings\sylvie lorsolo\My Documents\research\frances\data\total_wind\',sweepfile]);
%         HR=range*67*cos(deg2rad(ref_el));    
        if el==ele(1)
            range_el1=(HR/cos(deg2rad(true_el(1))))/67;
            range_el1=fix(range_el1);
            temp=total_wind(range_el1,1);
            data_el1=[data_el1;temp];
        elseif el==ele(2)
            range_el2=(HR/cos(deg2rad(true_el(2))))/67;
            range_el2=fix(range_el2);
            temp=total_wind(range_el2,1);
            data_el2=[data_el2;temp];
        elseif el==ele(3)
            range_el3=(HR/cos(deg2rad(true_el(3))))/67;
            range_el3=fix(range_el3);
            temp=total_wind(range_el3,1);
            data_el3=[data_el3;temp];
        elseif el==ele(4)
            range_el4=(HR/cos(deg2rad(true_el(4))))/67;
            range_el4=fix(range_el4);
            temp=total_wind(range_el4,1);
            data_el4=[data_el4;temp];
        elseif el==ele(5)
            range_el5=(HR/cos(deg2rad(true_el(5))))/67;
            range_el5=fix(range_el5);
            temp=total_wind(range_el5,1);
            data_el5=[data_el5;temp];
        elseif el==ele(6)
            range_el6=(HR/cos(deg2rad(true_el(6))))/67;
            range_el6=fix(range_el6);
            temp=total_wind(range_el6,1);
            data_el6=[data_el6;temp];
        elseif el==ele(7)
            range_el7=(HR/cos(deg2rad(true_el(7))))/67;
            range_el7=fix(range_el7);
            temp=total_wind(range_el7,1);
            data_el7=[data_el7;temp];
        end
    end
    range=[range_el1;range_el2;range_el3;range_el4;range_el5;range_el6;range_el7];
%     rangetot=[range08;range22;range38;range52;range68;range82];
%     vol=[vol rangetot];
    height=67*range.*sin(deg2rad(true_el));
    data_el=[data_el1 data_el2 data_el3 data_el4 data_el5 data_el6 data_el7];    
% end