a = SelectValue(3);
if nargin == 1 % LAUNCH GUI fig = openfig(mfilename,'reuse'); % Use system color scheme for figure: set(fig,'Color',get(0,'defaultUicontrolBackgroundColor')); % Generate a structure of handles to pass to callbacks, and store it. handles = guihandles(fig); guidata(fig, handles); % Set the value of the popup based on the input value set(handles.popupmenu1,'Value',varargin{1}) % Set userdata property of the pushbutton so that the code 'waits' until this value is changed set(handles.pushbutton1,'UserData','edit') % Use WAITFOR to have the GUI 'pause' until the userdata property is changed to 'read' waitfor(handles.pushbutton1,'UserData','read') if nargout > 0 % pass the value of the popup to varargout varargout{1} = get(handles.popupmenu1, 'Value'); % close window delete(fig); end elseif ischar(varargin{1}) % INVOKE NAMED SUBFUNCTION OR CALLBACK try [varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard catch disp(lasterr); end end
The callback for the popupmenu is not used. However, the callback for the pushbutton sets the 'UserData' property value to 'read'.
set(h,'UserData','read')
Once this occurs, the WAITFOR function resumes execution of the code and the value of the popupmenu is retrieved. The value is passed to VARARGOUT and the GUI is closed.
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.