Hi, I've been creating a GUI and I've noticed something odd that I am unfamiliar with. I have a edit text function that is being given an arbitrary value without me defining.
In the creation of the function I define rise to be 0:
function rise_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endrise = 0;handles.rise = rise;guidata(hObject, handles);
I have a push button that is supposed to take that value and check if it was left blank (rise = 0) or not. Instead when I call the handle in the check function, it is given a value of 203.0048. It should still be 0. Why? Here's the beginning of the check function.
function checkout = errorcheck(handles)rise = handles.rise
My output for rise is always the 203.0048 value. I output the value of rise throughout my script and the only place it changes is in the checkout function I made. I have checked the handle properties in debug mode, and I can't find any explanation. I am calling all other variables in my GUI the same way and without this problem. Anyone have insight? Thanks.
Best Answer