我在用matlab gui作图,想在三个axes中同时显示三副图,用subplot就可以显示,不过超出了边界想用plot(handles.axes)这种函数显示,程序如下:global A;global fs;sound=A;count1=length(sound);noise=0.05*randn(1,count1)
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/19 11:42:02
![我在用matlab gui作图,想在三个axes中同时显示三副图,用subplot就可以显示,不过超出了边界想用plot(handles.axes)这种函数显示,程序如下:global A;global fs;sound=A;count1=length(sound);noise=0.05*randn(1,count1)](/uploads/image/z/7137676-28-6.jpg?t=%E6%88%91%E5%9C%A8%E7%94%A8matlab+gui%E4%BD%9C%E5%9B%BE%2C%E6%83%B3%E5%9C%A8%E4%B8%89%E4%B8%AAaxes%E4%B8%AD%E5%90%8C%E6%97%B6%E6%98%BE%E7%A4%BA%E4%B8%89%E5%89%AF%E5%9B%BE%2C%E7%94%A8subplot%E5%B0%B1%E5%8F%AF%E4%BB%A5%E6%98%BE%E7%A4%BA%2C%E4%B8%8D%E8%BF%87%E8%B6%85%E5%87%BA%E4%BA%86%E8%BE%B9%E7%95%8C%E6%83%B3%E7%94%A8plot%EF%BC%88handles.axes%EF%BC%89%E8%BF%99%E7%A7%8D%E5%87%BD%E6%95%B0%E6%98%BE%E7%A4%BA%2C%E7%A8%8B%E5%BA%8F%E5%A6%82%E4%B8%8B%EF%BC%9Aglobal+A%3Bglobal+fs%3Bsound%3DA%3Bcount1%3Dlength%28sound%29%3Bnoise%3D0.05%2Arandn%281%2Ccount1%29)
我在用matlab gui作图,想在三个axes中同时显示三副图,用subplot就可以显示,不过超出了边界想用plot(handles.axes)这种函数显示,程序如下:global A;global fs;sound=A;count1=length(sound);noise=0.05*randn(1,count1)
我在用matlab gui作图,想在三个axes中同时显示三副图,用subplot就可以显示,不过超出了边界
想用plot(handles.axes)这种函数显示,程序如下:
global A;
global fs;
sound=A;
count1=length(sound);
noise=0.05*randn(1,count1);
signal = sound;
e=signal'+noise;
s1 = wden (e ,'minimaxi','s','one',5 ,'db3' ) ;
%选用 db3 小波对信号进行 5 层分解 ,并对细节系数选用 minimaxi 阈值模式和尺度噪声
plot(handles.axes1,sound);legend('原始语音波形');
plot(handles.axes2,e);legend('加噪声后波形');
plot(handles.axes3,s1);legend('去噪后波形');
但是,每次运行之后都是这个错误(财富值不多了,
Attempt to reference field of non-structure array.
Error in ==> yuyinzengqiang>pushbutton8_Callback at 115
plot(handles.axes1,sound);legend('原始语音波形');
Error in ==> gui_mainfcn at 96
feval(varargin{:});
Error in ==> yuyinzengqiang at 42
gui_mainfcn(gui_State,varargin{:});
Error in ==> @(hObject,eventdata)yuyinzengqiang('pushbutton8_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
我在用matlab gui作图,想在三个axes中同时显示三副图,用subplot就可以显示,不过超出了边界想用plot(handles.axes)这种函数显示,程序如下:global A;global fs;sound=A;count1=length(sound);noise=0.05*randn(1,count1)
plot(handles.axes1,sound);legend('原始语音波形');
plot(handles.axes2,e);legend('加噪声后波形');
plot(handles.axes3,s1);legend('去噪后波形');
这三句话改为:
axes(handles.axes1);
plot(sound);
legend('原始语音波形');
axes(handles.axes2);
plot(e);
legend('加噪声后波形');
axes(handles.axes3);
plot(s1);
legend('去噪后波形');