Hello,I have a matrix of nrows by 22 each .mat file. I want to take this data from each file and form a single matrix.the nrows in each file changes and the 22 columns remains same.could some one help me in solving this.

 Risposta accettata

KSSV
KSSV il 11 Lug 2021
matFiles = dir('*.mat') ;
N = length(matFiles) ;
iwant = zeros([],22,N) ;
for i = 1:N
load(matFiles(i).name) ;
iwant(:,:,i) = T ; % your matrix here
end

Più risposte (0)

Richiesto:

il 11 Lug 2021

Risposto:

il 11 Lug 2021

Community Treasure Hunt

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

Start Hunting!

Translated by