I am trying to read a .txt file with different no. of column in each row. Also first few lines contain header information. First few lines for the files are pasted below
Version 8.0 n19 SBUV data for day 006 2011 (2011/01/06) 1288 :Number of records1) year day sec-gmt Lat Lon SZA Total_Ozone Reflectivity Aerosol_Index Quality_residue Error_Flag2) ozone (DU) in 13 layers -- pressure level at the bottom of each layer(atm): 1.000 0.0631 0.0400 0.0251 0.0158 0.0100 0.0063 0.0040 0.00251 0.00158 0.0010 0.00063 0.000403) ozone (PPMV) at 15 pressure levels(hPa): 0.5 0.7 1.0 1.5 2.0 3.0 4.0 5.0 7.0 10.0 15.0 20.0 30.0 40.0 50.0 2011 6 5235 -71.26 -25.20 86.12 276.3 0.755 -0.8 0.032 11 99.76 46.51 41.39 29.819 22.048 15.650 10.123 5.814 2.846 1.286 0.5925 0.2722 0.2207 1.400 1.773 2.253 2.994 3.711 4.753 5.222 5.389 5.371 5.059 4.439 4.008 3.617 3.184 2.593 2011 6 5267 -72.87 -28.35 84.42 279.8 0.797 -1.4 0.031 11 101.67 47.43 41.91 29.989 22.153 15.722 10.123 5.744 2.816 1.271 0.5663 0.2516 0.2030 1.290 1.669 2.190 2.975 3.675 4.685 5.186 5.388 5.394 5.084 4.460 4.029 3.657 3.239 2.645
I am interested in reading data starting from 2011. I used fscanf and dlmread. fscanf could not work exactly. Also dlmread read few of the columns of the data. But not the full data. Kindly help me to read the data from this txt file. dlmread was used as M=dlmread(filename,'\t',8,0);
Thanks in advance
Best Answer