sampling audio signal

조회 수: 11 (최근 30일)
ramy iskander
ramy iskander 2011년 7월 7일
댓글: Walter Roberson 2018년 6월 1일
how to plot an audio signal (.wav) in matlab

답변 (3개)

Paulo Silva
Paulo Silva 2011년 7월 7일
[x,fs] = wavread('file');
t = 0:1/fs:length(x);
plot(t,x);
for stereo files
[y, fs]=wavread(fileName); % Read wave file
sound(y, fs); % Playback
left=y(:,1); % Left channel
right=y(:,2); % Right channel
subplot(2,1,1), plot((1:length(left))/fs, left);
subplot(2,1,2), plot((1:length(right))/fs, right);
  댓글 수: 1
hemalatha
hemalatha 2015년 1월 7일
i unable to get the plot of left and right..please explain the program

댓글을 달려면 로그인하십시오.


pooja thosar
pooja thosar 2017년 12월 22일
can u tell me how to play two different audio signals, i.e. one audio on right channel and one audio on left channel
  댓글 수: 1
Walter Roberson
Walter Roberson 2017년 12월 22일
Create a matrix in which the left channel is in column 1 and the right channel is in column 2. (If one column would be shorter pad it with 0 to be the same length as the other.) Now play the combined matrix.

댓글을 달려면 로그인하십시오.


Lijia Liu
Lijia Liu 2018년 6월 1일
how to make two wavefiles of different size equal to over this error: Dimensions of matrices being concatenated are not consistent.
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 6월 1일
Are you trying to make them multiple channels of the same sound? Are you trying to concatenate them together but some of them have different number of channels than the others?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by