sampling audio signal
显示 更早的评论
回答(3 个)
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
2015-1-7
i unable to get the plot of left and right..please explain the program
pooja thosar
2017-12-22
0 个投票
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
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
2018-6-1
0 个投票
how to make two wavefiles of different size equal to over this error: Dimensions of matrices being concatenated are not consistent.
1 个评论
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?
类别
在 帮助中心 和 File 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!