Equalizer undefined variable problem

2 ビュー (過去 30 日間)
Hassan Bosha
Hassan Bosha 2019 年 2 月 24 日
コメント済み: Walter Roberson 2019 年 2 月 25 日
function play_Callback(hObject, eventdata, handles)
% hObject handle to play (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global stop file_name C;
stop=1;
equalizer_play();
function equalizer_play()
global stop file_name C;
[x,Fs]= audioread(file_name);
[a,b]=coef();
l_bucata=2*Fs;
Nb=round(length(x)/l_bucata);
y=0;
for i=1:floor(Nb)
bucata=x((i-1)*l_bucata+1:i*l_bucata);
for k=1:5
y=y+filter(10^(C(k)/20)*b{k},a{k},bucata);
if(stop==0)
break;
end
end
wavplay(y,Fs,'async');
y=0;
if(stop==0)
break;
end
end
> MyEqualizer
Undefined function or variable 'wavplay'.
Error in MyEqualizer>equalizer_play (line 507)
wavplay(y,Fs,'async');
Error in MyEqualizer>play_Callback (line 490)
equalizer_play();
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in MyEqualizer (line 42)
gui_mainfcn(gui_State, varargin{:});
Error while evaluating UIControl Callback.
What is the solution for such error ?

採用された回答

Geoff Hayes
Geoff Hayes 2019 年 2 月 24 日
Hassan - is code referencing wavplay from the File Exchange (the inputs seem to match)? If so, have you downloaded the code and added it to the MATLAB Search Path?
  1 件のコメント
Hassan Bosha
Hassan Bosha 2019 年 2 月 24 日
i added the folder to the path and that's the issue Untitled.png

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

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 2 月 24 日
R2012a was the last release that had wavplay().
  4 件のコメント
Hassan Bosha
Hassan Bosha 2019 年 2 月 24 日
編集済み: Hassan Bosha 2019 年 2 月 24 日
a little bit help with the code ?
will that wavplay of the file exchange work after changing it to audioplay ?
Walter Roberson
Walter Roberson 2019 年 2 月 25 日
You asked this as a separate question and I replied there.

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

カテゴリ

Help Center および File ExchangeAudio and Video Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by