Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to load or pick same variables from multiple files without overwriting the previous values

조회 수: 1 (최근 30일)
I have three sudio files and each have the same variable.I want to store the values of the variables in same matrix without the previous value being overwritten.I will state the situation.
filename = ' *audiointerface12.mat*';
myVars = {'measuredSystem_L','measuredSystem_R'};
S = load(filename,myVars{:});
filename = 'audiointerface13.mat';
myVars = {'measuredSystem_L','measuredSystem_R'};
T = load(filename,myVars{:});
filename = 'audiointerface15.mat';
myVars = {'measuredSystem_L','measuredSystem_R'};
U = load(filename,myVars{:});
I have written a code for this script but the previous values are getting overwritten.How can I keep such a script where all the values of the same variables are stored respective to the audiofile.
My code:
matfiles=dir('*audiointerface*.mat');
N=length(matfiles);
filenames=cell(N,1);
for i=1:N filenames{i}=matfiles.name; data=load(matfiles(i).name);
end

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by