if true function adjust_contrast_Callback(hObject, eventdata, handles) axes(handles.axes1); h = imshow(handles.I); dbh = imcontrast(handles.figure1); set(dbh, 'CloseRequestFcn', @(s,e)getValues(s)) waitfor(dbh); I = get(h,'CData'); handles.I = I; imshow(handles.I); end %the callback function for when the user closes the imcontrast window function getValues(dbh) window_min = str2double(get(findobj(dbh, 'tag', 'window min edit'), 'String')); window_max = str2double(get(findobj(dbh, 'tag', 'window max edit'), 'String')); contrast = [window_min window_max]; handles.contrast = contrast; I'm able to get the values but I can't close the imcontrast window anymore, I tried close() didn't work... anyreason why would this happen? thank you!
close all
Figures with the 'HandleVisibility' property set to 'off' will not be closed with "close all". To close these figures, use the command
delete(findall(0));
To close all open Simulink models, use the command
bdclose all
If you have a GUI that opens plot windows and you would like to close all plots without closing the GUI at the same time, then you can use the following code:
% Delete all Figures with an empty FileName property delete(findall(groot, 'Type', 'figure', 'FileName', []));
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.