How to alter the dimensions of a cell array?

조회 수: 5 (최근 30일)
Cai Chin
Cai Chin 2020년 12월 27일
답변: Matt J 2020년 12월 28일
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
Cai Chin
Cai Chin 2020년 12월 28일
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

댓글을 달려면 로그인하십시오.

채택된 답변

Matt J
Matt J 2020년 12월 28일
Signals_v=num2cell(cell2mat(Signals_v),2);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by