Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fid = fopen(['C:\Users\Benjamin\Documents\Precip_Data\Hurricanes\'...
- 'HurData2005.txt'],'r') ;
- S = textscan(fid,'%s','delimiter','\n') ;
- %S{?} finds header, idx finds all the title line locations,
- S = S{1} ;
- fclose(fid) ;
- idx = find(contains(S,'AL')) ;
- %iwant{?} reads lines under that
- iwant = cell(length(idx),1) ;
- for i = 1:length(idx)-1
- iwant{i} = S(idx(i)+1:idx(i+1)-1) ;
- end
- iwant{end} = S(idx(end)+1:end) ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement