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.

 Akzeptierte Antwort

KSSV
KSSV am 11 Jul. 2021

0 Stimmen

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

Weitere Antworten (0)

Kategorien

Gefragt:

am 11 Jul. 2021

Beantwortet:

am 11 Jul. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by