MATLAB Answers

0

how to change size of a string?

Asked by Zeynab Mousavikhamene on 12 Oct 2019
Latest activity Answered by Stephan
on 12 Oct 2019
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?

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by Stephan
on 12 Oct 2019
 Accepted Answer

a = 'K10'
b = string(a)
whos

  0 Comments

Sign in to comment.