How to rearrange data by cutting rows and placing in new columns or using cell array?

조회 수: 4 (최근 30일)
I have a folder of files that are all lengths of multiples of 128 (one may be 768 and another may be 1024) with 4 columns of data points at each point. I need to reaarrange them so that each set of 128x4 is placed side by side in columns. So beginning with data with dimensions of 768x4 and ending with 128x24. Another alternative that would also work for me would be to place each extracted 128x4 set into a cell array for each set of data.
I am not sure the best way to do this and I'm sure it is easier than I am making it, but I have not succeed when trying to use mat2cell or cbind/rbind.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2021년 1월 19일
reshape()?
  댓글 수: 5
Undergrad
Undergrad 2021년 1월 19일
The ordering on the datapoints in each 128x4 set must keep the same orientation. The issue is that in data collection, these sets have been placed in consecutive rows (making the size of the whole array something like 1024x4). I need to move each of these 128x4 sets of data into columns that are side by side without changing the actual 128x4 set itself.
Undergrad
Undergrad 2021년 1월 19일
Yes that worked perfectly. Thank you Fangjun Jiang!

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by