I need to use strsplit to transform txt data into a cell array but i dont know how to do this

2 Kommentare

Matt J
Matt J am 2 Nov. 2022
What about the examples in the strsplit documentation?
KSSV
KSSV am 2 Nov. 2022
Show us your text.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 2 Nov. 2022

0 Stimmen

For example
s = 'I need to use strsplit to transform txt data into a cell array but i dont know how to do this';
words = strsplit(s, ' ')
words = 1×21 cell array
{'I'} {'need'} {'to'} {'use'} {'strsplit'} {'to'} {'transform'} {'txt'} {'data'} {'into'} {'a'} {'cell'} {'array'} {'but'} {'i'} {'dont'} {'know'} {'how'} {'to'} {'do'} {'this'}

Kategorien

Tags

Gefragt:

am 2 Nov. 2022

Beantwortet:

am 2 Nov. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by