How can I convert this cell array into a matrix?

2 visualizaciones (últimos 30 días)
Mary Hemler
Mary Hemler el 27 de Mayo de 2020
Respondida: David Hill el 27 de Mayo de 2020
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?

Respuesta aceptada

KSSV
KSSV el 27 de Mayo de 2020
Use reshape after that.
iwant = reshape(cell2mat(C),60,[])' ;

Más respuestas (1)

David Hill
David Hill el 27 de Mayo de 2020
reshape(cell2mat(C),60,[])';

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by