MATLAB 'play' 函数错误:未定义与 'double' 类型的输入参数相对应的函数
'global player; global x; global Fs;
%sound(x,Fs); play(player);未定义与 'double' 类型的输入参数相对应的函数 'play'。
出错 untitled>pushbutton3_Callback (line 161) play(player);
出错 gui_mainfcn (line 95) feval(varargin{:});
出错 untitled (line 42) gui_mainfcn(gui_State, varargin{:});
出错 matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)untitled('pushbutton3_Callback',hObject,eventdata,guidata(hObject))
计算 UIControl Callback 时出错。 之前是可以用play的现在不能了什么原因'
出现这个错误可能是因为您没有正确定义或初始化变量 'player'、'x' 和 'Fs'。请确保这些变量都被正确赋值,并且在调用 'play' 函数之前已经定义和初始化。如果问题仍然存在,请检查您的 MATLAB 版本是否支持 'play' 函数,并确认您的代码中是否存在其他错误。
原文地址: https://www.cveoy.top/t/topic/nG4C 著作权归作者所有。请勿转载和采集!