matlab gui 编程问题
function edit1_Callback(hObject, eventdata, handles)global A
A=str2num(get(handles.edit1,'string'));
function edit1_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit2_Callback(hObject, eventdata, handles)
global B
B=str2num(get(handles.edit2,'string'));
function edit2_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit3_Callback(hObject, eventdata, handles)
function edit3_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function pushbutton1_Callback(hObject, eventdata, handles)
global A B
c=A+B;
set(handles.edit3,'string',c);








楼主我看了半天,也只看得懂一点点,好像你这个程序没有头文件吧。。。感觉开头差了一点什么东西,真的不太懂。。。也是新手o(︶︿︶)o 请见谅