How to display the values using isfield, isempty or exist in the GUI?
Mostra commenti meno recenti
Hi,
I have made a GUI using GUIDE. I have two functions:
function one_Callback(hObject, eventdata, handles)
Two variables are there "levelLow" and "levelHigh"
% when I run this callback function I'll get these values
function two_Callback(hObject, eventdata, handles)
Another two variables are there "LowH" and "HighH"
When I execute the GUI, with the help of push buttons I can get either values for function one_Callback or function two_Callback at a time.
------------------------------------------
Using a push button I wish to display these values in the GUI.
%I tried but I couldn't get the desired output..
function pushbutton_callback
limits=[LowH, HighH];
if isfield(limits, 'LowH') || exist('LowH')
thresholdDetails=sprintf(' \n \n \n Lower Hue Level for Bgal= %.2f \n Higher Hue Level for Bgal = %.2f \n ',LowH,HighH);
else
thresholdDetails=sprintf(' \n \n \nLower Threshold Level =%.2f \n Higher Threshold Level=%.2f\n', levelLow, levelHigh);
end
set(handles.text2,'string',thresholdDetails);
% For this one I Could get only Hue level values but not the threshold values. When I run the function one I couldn't get the levelLow and levelHigh values.
I need to display the values of the lower hue level when I run function two and need to get lower threshold level values to diaplay when I run function one. please help me so that I can get the desired output.
Thanks..
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Creating, Deleting, and Querying Graphics Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!