MATLAB Answers

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

28 views (last 30 days)
Undergrad
Undergrad on 19 Jan 2021
Commented: Undergrad on 19 Jan 2021
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.

  0 Comments

Sign in to comment.

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 19 Jan 2021
reshape()?

  5 Comments

Show 2 older comments
Undergrad
Undergrad on 19 Jan 2021
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.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!