Why do i get the message" too many output arg"

5 ビュー (過去 30 日間)
Denny Muttathil
Denny Muttathil 2017 年 2 月 16 日
編集済み: zina shalchi 2020 年 9 月 25 日
I am trying to apply a filter on my music-file.By trying it to run, i get the error message
Error using audioread
Too many output arguments.
Error in A (line 1)
[z,fs,nb]= audioread('UnchainMyHeart.wav');
What do i need to do, to get rid of this problem? The size of my file is 478600x2, Bytes 7657600, Class double.
[z,fs,nb]= audioread('UnchainMyHeart.wav');
bfil=fft(z); %fft of input signal
wn=[1 200]/(fs/2); %bandpass
[b,a]=butter(6,wn);
fvtool(b,a);
f=filter(b,a,z);
afil=fft(f);
subplot(2,1,1);
plot(real(bfil));
title('input signal');
xlabel('frequency');
ylabel('magnitude');
subplot(2,1,2);
plot(real(afil));
title('filtered signal');
xlabel('frequency');
ylabel('magnitude');
I also think, i lack some knowledge about filters in general, if you happen to find some more mistakes, please enlighten me in this matter.

回答 (1 件)

Adam
Adam 2017 年 2 月 16 日
編集済み: Adam 2017 年 2 月 16 日
Surely this is obvious from the error message?
doc audioread
shows (in Matlab R2016b, at least) that audioread only has two output arguments so I have no idea what you expect your 3rd argument to be, especially with the names you give them.
Since you don't use 'nb' anywhere though just get rid of it from the output argument list.
  2 件のコメント
Denny Muttathil
Denny Muttathil 2017 年 2 月 16 日
Yeah my bad. I was confused myself. Actually the third arg i got, was in this link: http://matlab.izmiran.ru/help/techdoc/ref/wavread.html
I unintentionally reversed the arguments of each function.
zina shalchi
zina shalchi 2020 年 9 月 25 日
編集済み: zina shalchi 2020 年 9 月 25 日
can you tell me how can I use audioread with the following statement:
[Size, Sfreq, NbS, opt] = wavread (File, 'size');
I replaced audioread instead
[Size, Sfreq, NbS, opt] = audioread (File, 'size');
but I got errors too many arguments in output can you please help me to solve it?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by