MATLAB Answers

Cell conversion to double

3 views (last 30 days)
Jorge Fernández
Jorge Fernández on 11 Feb 2018
Commented: Gayatri Menon on 16 Feb 2018
Hello!
I need help. How can I convert this type of cell to a matrix? A={ '4165020ZR1P' '7495510GQ1P' '4997441PQ1P' 'ES10343TW1P' 'ES00220KT1P' '1114868FX1P'}
Thank you for your help.

  0 Comments

Sign in to comment.

Answers (1)

Gayatri Menon
Gayatri Menon on 14 Feb 2018
Hi
I am not sure if I completely understood the query.Assuming you want to convert the given cell array into character array, here are two methods for doing so:
If you want to convert the given 1x6 cell array A into 1x66 character array, you could use
cell2mat(A)
If you wish to convert A into 6x11 array, then you could use
char(A)
Thanks

  2 Comments

Jorge Fernández
Jorge Fernández on 15 Feb 2018
Hi Gayatri,
Thaks for your answer. I need to convert the given 1x6 cell array into a matrix 1x6 with the same data. Do you understand me?
Thaks for your help!
Gayatri Menon
Gayatri Menon on 16 Feb 2018
Are you looking for a 1x6 string array, then you could use
string(A)
Thanks

Sign in to comment.

Sign in to answer this question.