私はmatlabでGUIインターフェースを開発しました。ボタンを押すと、他のボタンが機能しなくなりました。たとえば、関数を実行しましたが、ファイルを開こうとすると、ファイルを開くボタンが機能しなくなり、次のエラーが表示されます。なぜ ?
Error in @(hObject,eventdata)untitled2('pushbutton15_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
function pushbutton15_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton15 (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({'*.*'},'Picture Selector');
fulpathname=strcat(pathname,filename);
set(handles.axes4,'Visible','On');
axes(handles.axes4)
imshow(fulpathname);
handles.pic=fulpathname;
info = imfinfo(fulpathname);
handles.format=info.Format;
guidata(hObject,handles);
function pushbutton16_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton16 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%pathname='C:\Users\Dr Syed Abdul Rahman\Desktop\innovation final\video detail\';
string1 = get(handles.edit1,'UserData');
%cd ..;
fName=strcat(cd,'\Video Detail\Video Detail',string1);
% fName=strcat(cd,'\Video Detail',(string1));
try
fid = fopen(fName);
sizS = 10000;
lineCt = 1;
tline = fgetl(fid);
while ischar(tline)
s{lineCt} = tline;
lineCt = lineCt + 1;
%# grow s if necessary
if lineCt > sizS
s = [s;cell(10000,1)];
sizS = sizS + 10000;
end
tline = fgetl(fid);
end
%# remove empty entries in s
s(lineCt:end) = [];
set(handles.text4,'Visible','On');
set(handles.edit1,'Visible','On','String',s{1})
set(handles.edit2,'Visible','On','String',s{2})
set(handles.edit3,'Visible','On','String',s{3})
set(handles.edit4,'Visible','On','String',s{4})
set(handles.edit5,'Visible','On','String',s{5})
set(handles.edit6,'Visible','On','String',s{6})
set(handles.edit7,'Visible','On','String',s{7})
set(handles.axes4,'Visible','On');
%cd 'C:\Users\Dr Syed Abdul Rahman\Desktop\innovation final\Images';
cd './Images';
%str=strcat(string1);
A = imread('25');
axes(handles.axes4)
imshow(A);
%imshow('./video detail/1.jpg');
catch err
set(handles.text3,'Visible','On','String','File is not exist !')
end