How I can split a two column data into chunks like this snap shot
Afficher commentaires plus anciens
Hello,
I have attached a mat file and I want to chunk my data in equal number of arrays like the attached image. Since I am dealing with a large data set of around 200 files of data and I have to do this iteration for every file and plot it. so kindly guide me and help me in chunking and plotting automatically as currently i am doing it manually with every file and using excel tool for data chunking and plotting.
Looking forward to your comments.

Réponse acceptée
Plus de réponses (1)
If I have understood correctly, this code should to the job. Note that 83 is a prime number, so it is difficult to create chunks. I have kept the first 80 rows
load('Data_Chunking.mat');
% remove three rows to make it "chunkable"
A = Alg2_mLat_maxEE(1:80,:);
% number of rows per chunk
N = 5;
% reshape to have N rows
B = reshape(permute(reshape(A,N,[],2),[1 3 2]),N,[])
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!