How can I convert this cell array into a matrix?

조회 수: 1 (최근 30일)
Mary Hemler
Mary Hemler 2020년 5월 27일
답변: David Hill 2020년 5월 27일
I have a 1x73 cell array (73 is number of neurons) filled with 1x60 doubles, {FR} (60 is number of bins). I would like to transform this into a 73 x 60 (NxB) matrix. The cell2mat function gives me a 1x4380 matrix. How can I fix this?

채택된 답변

KSSV
KSSV 2020년 5월 27일
Use reshape after that.
iwant = reshape(cell2mat(C),60,[])' ;

추가 답변 (1개)

David Hill
David Hill 2020년 5월 27일
reshape(cell2mat(C),60,[])';

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by