help how could read 2 or more wav file

i would like to kno how could i read 2 or more wave file in same code. actually i tried to use the same way for read one wav file ex: y = wavread('videoplayback2.wav','videoplayback3.wav') but i got error

 Accepted Answer

y = cell(2,1);
for nn = 2:3
filename = ['videoplayback' num2str(nn) '.wav'];
y{nn-1} = wavread(filename);
end

2 Comments

thanx alot
is thats code read only 2 wav files?
by the way 'videoplayback2' and 'videoplayback3' are different audio file so is it need to mention for each of them?
yes, but you can index that loop however you want.
The cell array y stores the audio. y{1} is videoplayback2, y{2} is videoplayback3

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!