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

2 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Fangjun Jiang
Fangjun Jiang il 19 Gen 2021
reshape()?
  5 Commenti
Undergrad
Undergrad il 19 Gen 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.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by