matlab gui界面设置。
%--------------------------------------------------------------------functionopen_Cal...
% --------------------------------------------------------------------
function open_Callback(hObject, eventdata, handles)
% hObject handle to open (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename.pathname]=uigetfile('*.jpg')
set (handles.edit1,'string',[pathname,filename]);
file=get(handles.edit1,'string');
A=imread(file);
axes(handles.axes1);
imshow(A);
出现以下错误为什么?
filename =
pathname: '5f8e340djw1dqtwco2akdj.jpg'
??? Reference to non-existent field 'edit1'.
Error in ==> untitled>open_Callback at 84
set (handles.edit1,'string',[pathname,filename]); 展开
function open_Callback(hObject, eventdata, handles)
% hObject handle to open (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename.pathname]=uigetfile('*.jpg')
set (handles.edit1,'string',[pathname,filename]);
file=get(handles.edit1,'string');
A=imread(file);
axes(handles.axes1);
imshow(A);
出现以下错误为什么?
filename =
pathname: '5f8e340djw1dqtwco2akdj.jpg'
??? Reference to non-existent field 'edit1'.
Error in ==> untitled>open_Callback at 84
set (handles.edit1,'string',[pathname,filename]); 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询