matlab - How to load .mat file which has a variable filename? -
%select .mat files oar = dir('*oar.mat'); n = {oar.name}; %loop through files l=1:length(oar); load pat_oar(l) %<---this .mat file variable filename clear ... end
how write matlab script read in 1 .mat file after another...
you file names stored in n
, should able do:
for l=1:length(oar) load(n{l}) end
Comments
Post a Comment