Hi,
I have a 1 x 30 cell, A. Each element of A is a 1 x 10 double. How can I convert this to a 30 x 10 double, where each row is an element of cell A?
Any help would be appreciated! Thanks,
Sushma

댓글 수: 1

sushma sharma
sushma sharma 2016년 9월 28일
cell2mat gives me a 1 x 300 double...how can i get it to be a 30 x 10 double...

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

 채택된 답변

Star Strider
Star Strider 2016년 9월 28일

0 개 추천

See if the cell2mat function will do what you want.

댓글 수: 2

Star Strider
Star Strider 2016년 9월 28일
sushma sharma’s Comment is duplicated here:
cell2mat gives me a 1 x 300 double...how can i get it to be a 30 x 10 double...
Transpose your cell array first:
double_matrix = cell2mat(cell_array');
This uses the transpose operator (').

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

추가 답변 (1개)

Image Analyst
Image Analyst 2016년 9월 28일

0 개 추천

Star's answer gives you a double matrix. If you really want a "table" (if you even know what that is), use the function cell2table().

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

질문:

2016년 9월 28일

답변:

2016년 9월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by