Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Finding specific phrases within a cell array
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Greetings,
I am working with a total of nine(9) text strings within nine(9) cell ( {9x1} )
and I am trying to take specific sentences of the text strings.
For example, one text string says:
EAST WINDS 15 TO 20 KNOTS. SEAS 4 TO 6 FEET.
I am trying to divide these two sentences in two structured variables under the name Today.
Today.Winds = EAST WINDS 15 TO 20 KNOTS
Today.Waves = SEAS 4 TO 6 FEET
I was thinking of telling MATLAB to break when he reaches the first dot and imprint the string as Today.wind, then continue till the next dot, break and imprint it as Today.waves.
How can I do this?
Thank you for your time.
2 comentarios
Jan
el 15 de Jul. de 2012
How do you want to store the output for the 9 different strings? Struct array or as scalar struct, which contains cell strings? E.g. the ninth one: Today(9).Winds or Today.Winds{9}.
Respuestas (0)
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!