Hi everyone,
I have this block of code:
HWFiles = {'midas_wind_197901-197912.txt',............'midas_wind_201301-201312.txt'};for k=1:numel(HWFiles); fid = fopen(HWFiles{k}, 'r'); tmp = textscan(fid,'%s %*s %*f %*f %*s %*f %f %*f %f %f %f %f %f %*f %*f %*f %*f %*f %*f %*f %*f %*s %*f', 'Delimiter',','); HWData(k).data = tmp ; fclose(fid); end
Not pasting well sorry. HWData becomes a 1 x 35 struct and I wanted to change each field name to the year from the file, eg 1979, 1980 …. 2013. Any ideas with this?
Best Answer