Convert cell to table
조회 수: 4 (최근 30일)
이전 댓글 표시
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
채택된 답변
Star Strider
2016년 9월 28일
See if the cell2mat function will do what you want.
댓글 수: 2
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...
Star Strider
2016년 9월 28일
Transpose your cell array first:
double_matrix = cell2mat(cell_array');
This uses the transpose operator (').
추가 답변 (1개)
Image Analyst
2016년 9월 28일
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().
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!