필터 지우기
필터 지우기

Cell conversion to double

조회 수: 1 (최근 30일)
Jorge Fernández
Jorge Fernández 2018년 2월 11일
댓글: Gayatri Menon 2018년 2월 16일
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.

답변 (1개)

Gayatri Menon
Gayatri Menon 2018년 2월 14일
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
Jorge Fernández
Jorge Fernández 2018년 2월 15일
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 2018년 2월 16일
Are you looking for a 1x6 string array, then you could use
string(A)
Thanks

댓글을 달려면 로그인하십시오.

카테고리

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