How to alter the dimensions of a cell array?

6 visualizaciones (últimos 30 días)
Cai Chin
Cai Chin el 27 de Dic. de 2020
Respondida: Matt J el 28 de Dic. de 2020
Hi, I am trying to alter the dimensions of my array so it meets the requirements for training of a neural network. At the moment, the variable 'Signals_v' is a 42 x 1 cell array with the following components. Each double represents a separate array with the dimesions n x 900, 42 of which I have concatenated to create 'Signals_v'. How do I change these dimensions to effectively split up each of those doubles so that the dimensions of the cell array are instead 2243 x 1 with 1x900 doubles? Any suggestions would be greatly appreciated, thanks in advance.
{ 74×900 double}
{ 66×900 double}
{ 65×900 double}
{101×900 double}
{ 77×900 double}
{ 56×900 double}
{ 93×900 double}
{ 65×900 double}
{ 75×900 double}
{ 67×900 double}
{ 84×900 double}
{ 98×900 double}
{ 57×900 double}
{ 55×900 double}
{ 54×900 double}
{ 61×900 double}
{ 76×900 double}
{ 79×900 double}
{ 77×900 double}
{ 85×900 double}
{ 59×900 double}
{ 76×900 double}
{ 60×900 double}
{ 53×900 double}
{ 75×900 double}
{ 50×900 double}
{ 76×900 double}
{ 11×900 double}
{ 19×900 double}
{ 14×900 double}
{ 11×900 double}
{ 31×900 double}
{ 11×900 double}
{ 8×900 double}
{ 8×900 double}
{ 13×900 double}
{ 52×900 double}
{ 4×900 double}
{ 76×900 double}
{ 35×900 double}
{ 30×900 double}
{ 6×900 double}
How do I change these dimensions such that the cell array instead contains {1 x 900} doubles?
  2 comentarios
Cai Chin
Cai Chin el 28 de Dic. de 2020
With this one, I am unsure as to how to separate the individual arrays comprising the cell array so the cell array has doubles with dimensions of 1x900 instead of 42x900, etc., but with the other question, I was not sure how to add another dimension to the doubles comprising the cell array

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 28 de Dic. de 2020
Signals_v=num2cell(cell2mat(Signals_v),2);

Más respuestas (0)

Categorías

Más información sobre Characters and Strings 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