How to store words from a string in a cell array as a multiple strings

4 visualizzazioni (ultimi 30 giorni)
Hi, I have a 1x1 cell array containing a string of words:
{'Date,Hour,Latitude,Longitude,Windspeed,Pressure'}
How would you extract each of those words individually from the string and store them perhaps in a 1x6 cell array?

Risposta accettata

Jonas
Jonas il 25 Giu 2021
Modificato: Jonas il 25 Giu 2021
use the function strsplit() here with Delimiter ','
if your cell has name a, use
strsplit(a{1},',')

Più risposte (0)

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by