MATLAB Answers

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

조회 수: 6(최근 30일)
Oliver Massaad
Oliver Massaad 2021년 6월 25일
편집: Jonas 2021년 6월 25일
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개)

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by