Search within a character array
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have this character array:
EAST WINDS 11 TO 16 KNOTS. SEAS 2 TO 4 FEET. SCATTERED
SHOWERS. % its indices being row (13), column (1:65) from a text file
I want to create a structured variable taking only phrases of this sentence. For example if I type:
'Today'
The output must be:
Today =
winds: 'EAST WINDS 12 TO 14 KNOT'
waves: 'SEAS 3 TO 4 FEET'
Here's the catch, I am taking this sentence from a forecasting web page that updates daily, meaning the indices changes daily. One day the wind forecast may be on row 16 and with more or less columns (1:56 for example). The character array MUST be this information especifically, winds and waves and it could have more or less columns. What function or commands can I use?
0 Commenti
Risposta accettata
Albert Yam
il 12 Lug 2012
I would guess http://www.mathworks.com/help/techdoc/ref/urlread.html and creative use of http://www.mathworks.com/help/techdoc/ref/regexp.html.
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!