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

3 次查看(过去 30 天)
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?

采纳的回答

Jonas
Jonas 2021-6-25
编辑:Jonas 2021-6-25
use the function strsplit() here with Delimiter ','
if your cell has name a, use
strsplit(a{1},',')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by