I have a 1*4 cell array and all members have the same size "{ [100*1] , [100*1], [100*1] ,[100*1]}" . I want to convert cell array in a way that get a matrix of (4*100). I mean each member of the cell array would be a column of my matrix.

 채택된 답변

OCDER
OCDER 2018년 9월 6일

0 개 추천

A = repmat({rand(100, 1)}, 1, 4); %your 1x4 cell containin 100x1 matrix per each cell
B = [A{:}] %your 100x4 matrix

추가 답변 (1개)

Geoff Hayes
Geoff Hayes 2018년 9월 6일

0 개 추천

Sara - cell2mat might be what you are looking for.

카테고리

도움말 센터File Exchange에서 Cell Arrays에 대해 자세히 알아보기

제품

릴리스

R2018a

질문:

2018년 9월 6일

댓글:

2018년 9월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by