% Note, the output of SoundingWinds file is a matrix Winds, where: % the first column contains altitude AGL in ft % the second column contains wind direction in deg % the third column contains wind speed in kn % Also, the outputs are the numerical values of lat, lon in deg % and Ltime, Ldate - when the measurments were taken as char %% Reading heading information [Y,M,D,H,f1,f2,f3,lat,lon]=... textread(FileName,'%4c-%2c-%2c_%2c %s i,j=( %f , %f ),lat,long=( %f , %f',... 1,'headerlines',2); Ldate=[M '/' D '/' Y];, Ltime=[H ':00']; file = textread(FileName, '%s', 'delimiter', '\n'); %% Reading numerical data N=length(file); i=6; Winds=[0 0 0]; while i <= N [q,w,e,r,t,y,u]=... textread(FileName,'%f %f %f %f %f %f %f',1,'headerlines',i); Winds=vertcat(Winds,[w y t]); % the format is altitude, Wdir, Wspeed i=i+1; end Winds(1,:)=[]; clear q w e r t y u H i N file %% Conversion to English units Winds(:,1)=Winds(:,1)*3.2808; % converting altitude to ft to make outputs the same Winds(:,3)=Winds(:,3)/0.514; % converting Wspeed to kn to make outputs the same