how to change size of a string?

12 次查看(过去 30 天)
I use regexp(struct(jjj).name,'\_','split'); command to split this structure: K10_5. After being split: {'K10'} I convert it to ordinary array using cell2mat: 'K10'
I realized that 'K10' size is 1*3. How can I make it to be 1*1 not 1*3?

采纳的回答

Stephan
Stephan 2019-10-12
a = 'K10'
b = string(a)
whos

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by