Greetings,
I am trying to create a {… x 4} cell array with the following data.
#YY MM DD hh mm WVHT SwH SwP WWH WWP SwD WWD STEEPNESS APD MWD#yr mo dy hr mn m m sec m sec - degT - sec degT2012 12 17 16 54 1.1 0.4 10.5 0.9 9.1 N N AVERAGE 6.9 3552012 12 17 16 24 1.1 0.4 10.5 1.0 9.9 N N AVERAGE 6.9 62012 12 17 15 54 1.0 0.5 10.5 0.9 9.1 N N AVERAGE 7.4 62012 12 17 15 24 1.1 0.4 11.1 0.9 9.9 NNE N AVERAGE 7.7 92012 12 17 14 54 1.1 0.4 10.5 0.9 9.9 N N AVERAGE 7.9 3592012 12 17 14 24 0.9 0.5 10.5 0.8 9.1 N N AVERAGE 7.6 32012 12 17 13 54 0.9 0.4 10.5 0.8 9.9 N N AVERAGE 7.5 92012 12 17 13 24 1.0 0.5 10.5 0.8 9.9 N NNE AVERAGE 7.7 182012 12 17 12 54 1.0 0.5 10.5 0.8 9.9 N N AVERAGE 7.8 358...
I want to take the first five columns (yr mo dy hr mn) and make it the first cell array. Then take all the rows starting from the third row, keeping in mind the program updates daily and the number of rows varies.
If you help me with this I can deal with the other 3 columns of the cell array
So far the code goes like this,
clc,clear all fid = urlwrite('http://www.ndbc.noaa.gov/data/realtime2/41115.spec','Rincon.txt'); % URL from CARICOOS
Could you please help?
Best Answer