How to create a cell array with wave data?
Show older comments
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 degT
2012 12 17 16 54 1.1 0.4 10.5 0.9 9.1 N N AVERAGE 6.9 355
2012 12 17 16 24 1.1 0.4 10.5 1.0 9.9 N N AVERAGE 6.9 6
2012 12 17 15 54 1.0 0.5 10.5 0.9 9.1 N N AVERAGE 7.4 6
2012 12 17 15 24 1.1 0.4 11.1 0.9 9.9 NNE N AVERAGE 7.7 9
2012 12 17 14 54 1.1 0.4 10.5 0.9 9.9 N N AVERAGE 7.9 359
2012 12 17 14 24 0.9 0.5 10.5 0.8 9.1 N N AVERAGE 7.6 3
2012 12 17 13 54 0.9 0.4 10.5 0.8 9.9 N N AVERAGE 7.5 9
2012 12 17 13 24 1.0 0.5 10.5 0.8 9.9 N NNE AVERAGE 7.7 18
2012 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?
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!