How do I convert a multidimensional array into a 1 x1 cell array?
Mostrar comentarios más antiguos
I have a 1 x 20 vector and need to convert it into a 1x1 cell array without using 'reshape.'
Respuestas (2)
KSSV
el 19 de Jun. de 2017
A = rand(1,20) ;
iwant{1} = mat2cell(A,1) ;
4 comentarios
Richard Wilson
el 19 de Jun. de 2017
Walter Roberson
el 19 de Jun. de 2017
Correlation cannot be applied directly to cell arrays: you have to index the content of the cell arrays.
Richard Wilson
el 20 de Jun. de 2017
Walter Roberson
el 20 de Jun. de 2017
Editada: Walter Roberson
el 20 de Jun. de 2017
Using { } indexing.
xcorr(FirstCell{1}, SecondCell[1})
Walter Roberson
el 19 de Jun. de 2017
Perhaps you mean,
output = {YourArray};
or perhaps you mean
output = num2cell(YourArray);
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!