sampling audio signal

12 visualizaciones (últimos 30 días)
ramy iskander
ramy iskander el 7 de Jul. de 2011
Comentada: Walter Roberson el 1 de Jun. de 2018
how to plot an audio signal (.wav) in matlab

Respuestas (3)

Paulo Silva
Paulo Silva el 7 de Jul. de 2011
[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 comentario
hemalatha
hemalatha el 7 de En. de 2015
i unable to get the plot of left and right..please explain the program

Iniciar sesión para comentar.


pooja thosar
pooja thosar el 22 de Dic. de 2017
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 comentario
Walter Roberson
Walter Roberson el 22 de Dic. de 2017
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.

Iniciar sesión para comentar.


Lijia Liu
Lijia Liu el 1 de Jun. de 2018
how to make two wavefiles of different size equal to over this error: Dimensions of matrices being concatenated are not consistent.
  1 comentario
Walter Roberson
Walter Roberson el 1 de Jun. de 2018
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?

Iniciar sesión para comentar.

Categorías

Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by