gui图形界面编程的问题
edit text1 输入 阶数function zeta_edit1_Callback(hObject, eventdata, handles)
M=str2num(get(handles.zeta_edit1,'string'));
handles.zeta_edit1=M;
edit text2 输入 通带频率
function zeta_edit2_Callback(hObject, eventdata, handles)
wp=str2num(get(handles.zeta_edit2,'string'));
handles.zeta_edit2=wp;
edittext3 是输入 截至频率
function zeta_edit3_Callback(hObject, eventdata, handles)
ws=str2num(get(handles.zeta_edit3,'string'));
M=handles.zeta_edit1;
wp=handles.zeta_edit2;
wc=(ws+wp)/2;
hd=ideal_lp(wc,M);
w_ham=hamming(M);
h=hd*w_ham;
=freqz_m(h,);
delta_w=2*pi/1000;
Rp=-(min(db(1:1:wp/delta_w+1)));
RP=0.0394
As=-round(max(db(ws/delta_w+1:1:501)));
As=52
axes(handles.axes1);
stem(n,hd);
axes(handles.axes2);
stem(n,w_ham);
希望有高人指点。
MATLAB 提示错误是
Warning: Rounding order to nearest integer.
> In signal\private\check_order at 24
In signal\private\gencoswin at 18
In hamming at 17
In luhuacheng>zeta_edit3_Callback at 139
In gui_mainfcn at 75
In luhuacheng at 44
Warning: Integer operands are required for colon operator when used as index.
> In luhuacheng>zeta_edit3_Callback at 143
In gui_mainfcn at 75
In luhuacheng at 44
??? Index exceeds matrix dimensions.
Error in ==> luhuacheng>zeta_edit3_Callback at 143
Rp=-(min(db(1:1:wp/delta_w+1)));
Error in ==> gui_mainfcn at 75
feval(varargin{:});
Error in ==> luhuacheng at 44
gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback.
[ 本帖最后由 eight 于 2007-6-18 10:01 编辑 ] 原帖由 yinderuihot 于 2007-6-18 07:49 发表 http://www.chinavib.com/forum/images/common/back.gif
edit text1 输入 阶数
function zeta_edit1_Callback(hObject, eventdata, handles)
M=str2num(get(handles.zeta_edit1,'string'));
handles.zeta_edit1=M;
edit text2 输入 通 ...
警告可以不管,至于 ??? Index exceeds matrix dimensions. 的错误,请看置顶贴 哦。谢谢。原来警告可以不管阿。刚刚知道。我再调试试试
[ 本帖最后由 eight 于 2007-6-18 10:19 编辑 ]
页:
[1]