help how could read 2 or more wav file

2 views (last 30 days)
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

Wayne King
Wayne King on 12 Nov 2011
y = cell(2,1);
for nn = 2:3
filename = ['videoplayback' num2str(nn) '.wav'];
y{nn-1} = wavread(filename);
end
  2 Comments
yassir z
yassir z on 12 Nov 2011
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?
Wayne King
Wayne King on 12 Nov 2011
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)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!