필터 지우기
필터 지우기

can anyone fix this issue?

조회 수: 1 (최근 30일)
sana saleeme
sana saleeme 2016년 5월 1일
댓글: Walter Roberson 2016년 5월 1일
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)plz('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback
and my code is
function varargout = plz(varargin)
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @plz_OpeningFcn, ...
'gui_OutputFcn', @plz_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before plz is made visible.
function plz_OpeningFcn(hObject, eventdata, handles, varargin)
% Choose default command line output for plz
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes plz wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = plz_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[c, d] = uigetfile({'*.*' , 'all files'});
imj = imread([c , d]);
s = imshow(imj , 'parent' , handles.axes1);
imshow(s);
  댓글 수: 1
sana saleeme
sana saleeme 2016년 5월 1일
i want to browse an image it browse image but don't show

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2016년 5월 1일
The order of outputs from uigetfile is file name first and then directory. Your use of [c , d] has the components in the wrong order.
What you should use instead of [c, d] is fullfile(d, c)
filename = fullfile(d, c);
imj = imread(filename);
  댓글 수: 2
sana saleeme
sana saleeme 2016년 5월 1일
Walter Roberson kindly give your email please
Walter Roberson
Walter Roberson 2016년 5월 1일
I do not answer much of my email. I respond more to posted questions.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by