Sir i tried to plot a spectrogram for an audio . it showing error.
3 次查看(过去 30 天)
显示 更早的评论
This is my code:
function outputSpectrogram(input)
[audio, fs] = audioread('asianelephantspeaker.wav');
audioMono = (audio(:, 1) + audio(:, 2)) / 2;
spectrogram(audio, 256, [], 25, 2000, 'yaxis');
title('rumble')
end
The error is like this "outputspectrogram
Error using spectrogram>chkinput (line 252)
X must be a vector (either row or column).
Error in spectrogram (line 166)
chkinput(x);
Error in outputspectrogram (line 5)
spectrogram(audio, 256, [], 25, 2000, 'yaxis');
>> "
How i will rectify this error?
and I will also attach my audio with this.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulation, Tuning, and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!