function varargout = nma_lab2_eme_121(varargin) %main GUI file for lab2 MAE 121 UC Davis % NMA_LAB2_EME_121 MATLAB code for nma_lab2_eme_121.fig % NMA_LAB2_EME_121, by itself, creates a new NMA_LAB2_EME_121 or raises the existing % singleton*. % % H = NMA_LAB2_EME_121 returns the handle to a new NMA_LAB2_EME_121 or the handle to % the existing singleton*. % % NMA_LAB2_EME_121('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in NMA_LAB2_EME_121.M with the given input arguments. % % NMA_LAB2_EME_121('Property','Value',...) creates a new NMA_LAB2_EME_121 or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before nma_lab2_eme_121_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to nma_lab2_eme_121_OpeningFcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % By Nasser M. Abbasi % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help nma_lab2_eme_121 % Last Modified by GUIDE v2.5 18-Jul-2012 18:30:39 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @nma_lab2_eme_121_OpeningFcn, ... 'gui_OutputFcn', @nma_lab2_eme_121_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 nma_lab2_eme_121 is made visible. function nma_lab2_eme_121_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to nma_lab2_eme_121 (see VARARGIN) % Choose default command line output for nma_lab2_eme_121 handles.output = hObject; set(handles.figure1, 'UserData',[]); set(handles.figure1,'Name','UC Davis, EME 121 second lab, by Nasser M. Abbasi'); userData.stop = false; set(handles.figure1, 'UserData',userData); % Update handles structure guidata(hObject, handles); % UIWAIT makes nma_lab2_eme_121 wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = nma_lab2_eme_121_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; function massDiskTag_Callback(hObject, eventdata, handles) % hObject handle to massDiskTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of massDiskTag as text % str2double(get(hObject,'String')) returns contents of massDiskTag as a double % --- Executes during object creation, after setting all properties. function massDiskTag_CreateFcn(hObject, eventdata, handles) % hObject handle to massDiskTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function radiusDiskTag_Callback(hObject, eventdata, handles) % hObject handle to radiusDiskTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of radiusDiskTag as text % str2double(get(hObject,'String')) returns contents of radiusDiskTag as a double % --- Executes during object creation, after setting all properties. function radiusDiskTag_CreateFcn(hObject, eventdata, handles) % hObject handle to radiusDiskTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function massPTag_Callback(hObject, eventdata, handles) % hObject handle to massPTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of massPTag as text % str2double(get(hObject,'String')) returns contents of massPTag as a double % --- Executes during object creation, after setting all properties. function massPTag_CreateFcn(hObject, eventdata, handles) % hObject handle to massPTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function freqTag_Callback(hObject, eventdata, handles) % hObject handle to freqTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of freqTag as text % str2double(get(hObject,'String')) returns contents of freqTag as a double % --- Executes during object creation, after setting all properties. function freqTag_CreateFcn(hObject, eventdata, handles) % hObject handle to freqTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function aTag_Callback(hObject, eventdata, handles) % hObject handle to aTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of aTag as text % str2double(get(hObject,'String')) returns contents of aTag as a double % --- Executes during object creation, after setting all properties. function aTag_CreateFcn(hObject, eventdata, handles) % hObject handle to aTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function y0Tag_Callback(hObject, eventdata, handles) % hObject handle to y0Tag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of y0Tag as text % str2double(get(hObject,'String')) returns contents of y0Tag as a double % --- Executes during object creation, after setting all properties. function y0Tag_CreateFcn(hObject, eventdata, handles) % hObject handle to y0Tag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function yprimeTag_Callback(hObject, eventdata, handles) % hObject handle to yprimeTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of yprimeTag as text % str2double(get(hObject,'String')) returns contents of yprimeTag as a double % --- Executes during object creation, after setting all properties. function yprimeTag_CreateFcn(hObject, eventdata, handles) % hObject handle to yprimeTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function theta0Tag_Callback(hObject, eventdata, handles) % hObject handle to theta0Tag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of theta0Tag as text % str2double(get(hObject,'String')) returns contents of theta0Tag as a double % --- Executes during object creation, after setting all properties. function theta0Tag_CreateFcn(hObject, eventdata, handles) % hObject handle to theta0Tag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function thetaPrimeTag_Callback(hObject, eventdata, handles) % hObject handle to thetaPrimeTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of thetaPrimeTag as text % str2double(get(hObject,'String')) returns contents of thetaPrimeTag as a double % --- Executes during object creation, after setting all properties. function thetaPrimeTag_CreateFcn(hObject, eventdata, handles) % hObject handle to thetaPrimeTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function simTimeTag_Callback(hObject, eventdata, handles) % hObject handle to simTimeTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of simTimeTag as text % str2double(get(hObject,'String')) returns contents of simTimeTag as a double % --- Executes during object creation, after setting all properties. function simTimeTag_CreateFcn(hObject, eventdata, handles) % hObject handle to simTimeTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in runBtn. function runBtn_Callback(hObject, eventdata, handles) % hObject handle to runBtn (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [data,status] = parse_input(handles); if not(status) return; end data.handles = handles; data.g = 9.8; enable_all(handles,'off'); userData = get(handles.figure1, 'UserData'); userData.stop = false; set(handles.figure1, 'UserData',userData); [g_msg,g_status]=nma_lab2_eme_121(data); if not(g_status) uiwait(errordlg(sprintf('Processing terminated: %s',g_msg),... 'Bad Input', 'modal')); uicontrol(handles.f_tag); end enable_all(handles,'on'); %----------------------------------------- % % %------------------------------------------ function [data,status]= parse_input(handles) [data.mass_disk,status]=nma_verify_valid_positive_numeric... (get(handles.massDiskTag,'String'),handles.massDiskTag,... 'Disk mass must be positive number'); if not(status) return; end [data.R,status]=nma_verify_valid_positive_numeric... (get(handles.radiusDiskTag,'String'),handles.radiusDiskTag,... 'Disk radius must be positive number'); if not(status) return; end [data.mass_particle,status]=nma_verify_valid_positive_numeric... (get(handles.massPTag,'String'),handles.massPTag,... 'mass of particle must be positive number'); if not(status) return; end [data.f,status]=nma_verify_valid_positive_numeric... (get(handles.freqTag,'String'),handles.freqTag,... 'Spring natural frequency must be positive number'); if not(status) return; end [data.a,status]=nma_verify_valid_numeric... (get(handles.aTag,'String'),handles.aTag,... 'distance to slot must be positive number'); if not(status) return; end if data.a<0 uiwait(errordlg('distance to slot can not be negative number',... 'Bad Input', 'modal')); status = 0; uicontrol(handles.aTag); return end if data.a>0.9*data.R uiwait(errordlg('distance to slot is too large, must be less than 0.9 of radius',... 'Bad Input', 'modal')); status = 0; uicontrol(handles.aTag); return end [data.y_zero,status]=nma_verify_valid_numeric... (get(handles.y0Tag,'String'),handles.y0Tag,... 'y(0) must be numerical value'); if not(status) return; end data.arcLength=sqrt(data.R^2-data.a^2); if abs(data.y_zero)>0.9*data.arcLength uiwait(errordlg('Initial position of particle outside allowed range, reduce and try again',... 'Bad Input', 'modal')); status = 0; uicontrol(handles.y0Tag); return end [data.y_speed_zero,status]=nma_verify_valid_numeric... (get(handles.yprimeTag,'String'),handles.yprimeTag,... 'dy/dt(0) must be numerical value'); if not(status) return; end [data.angle_zero,status]=nma_verify_valid_numeric... (get(handles.theta0Tag,'String'),handles.theta0Tag,... 'theta(0) must be numerical value'); if not(status) return; end if abs(data.angle_zero)>180 uiwait(errordlg('Initial angle must be between 0 and 180 degrees only',... 'Bad Input', 'modal')); status = 0; uicontrol(handles.theta0Tag); return else data.angle_zero = data.angle_zero*pi/180; end [data.angle_speed_zero,status]=nma_verify_valid_numeric... (get(handles.thetaPrimeTag,'String'),handles.thetaPrimeTag,... 'initial angle speed must be numerical value'); if not(status) return; end [data.maxSimulationTime,status]=nma_verify_valid_positive_numeric... (get(handles.simTimeTag,'String'),handles.simTimeTag,... 'maximum simulation time must be positive number'); if not(status) return; end % contents = cellstr(get(handles.ode_solver_tag,'String')); % data.solver = contents{get(handles.ode_solver_tag,'Value')}; % [data.timeStep,status]=nma_verify_valid_numeric... (get(handles.timeStepTag,'String'),handles.timeStepTag,... 'time step must be zero or larger'); if not(status) return; end if get(handles.stepTorqueTag,'Value')==1 data.useKP=false; [data.stepTorqueAmount,status]=nma_verify_valid_numeric... (get(handles.torqueTag,'String'),handles.torqueTag,... 'Step torque must be numerical value'); if not(status) return; end if data.stepTorqueAmount<0 uiwait(errordlg('Only positive (clock-wise) torque is supported at this time',... 'Bad Input', 'modal')); status = 0; uicontrol(handles.torqueTag); return end data.maxTorque=data.stepTorqueAmount; if data.maxTorque==0 data.maxTorque=1; %for plotting end [data.stepTorqueDuration,status]=nma_verify_valid_numeric... (get(handles.torqueDurationTag,'String'),handles.torqueDurationTag,... 'Step torque duration must be numeric'); if not(status) return; end if data.stepTorqueDuration<0 uiwait(errordlg('step torque duration can not be negative',... 'Bad Input', 'modal')); status = 0; uicontrol(handles.torqueDurationTag); return end else data.useKP=true; [data.multiplier,status]=nma_verify_valid_positive_numeric... (get(handles.multiplierTag,'String'),handles.multiplierTag,... 'n multiplier must be numerical value'); if not(status) return; end [data.kp,status]=nma_verify_valid_positive_numeric... (get(handles.kpTag,'String'),handles.kpTag,... 'Kp must be numerical value'); if not(status) return; end data.maxTorque=0; end data.I=data.mass_disk*data.R^2/2; data.k=data.mass_particle*(2*pi*data.f)^2; data.a1=data.a-data.R/12; data.a2=data.a+data.R/12; data.kp=10; data.solver = 'ode45'; data.h1=sqrt(data.R^2-data.a1^2); data.h2=sqrt(data.R^2-data.a2^2); data.maxY = 0; data.minY = 0; data.maxOmega = 0; data.minOmega = 0; data.lastYsign = 1; data.numberOfYFlips = 0; status = true; %------------------------------- % % %-------------------------------- function enable_all(handles,to) set(handles.massDiskTag,'Enable',to); set(handles.radiusDiskTag,'Enable',to); set(handles.massPTag,'Enable',to); set(handles.freqTag,'Enable',to); set(handles.aTag,'Enable',to); set(handles.theta0Tag,'Enable',to); set(handles.y0Tag,'Enable',to); set(handles.yprimeTag,'Enable',to); set(handles.thetaPrimeTag,'Enable',to); set(handles.simTimeTag,'Enable',to); set(handles.timeStepTag,'Enable',to); set(handles.stepTorqueTag,'Enable',to); if strcmp(to,'on') if get(handles.stepTorqueTag,'Value')==1 set(handles.torqueTag,'Enable',to); set(handles.torqueDurationTag,'Enable',to); end else set(handles.torqueTag,'Enable',to); set(handles.torqueDurationTag,'Enable',to); end set(handles.propTag,'Enable',to); if strcmp(to,'on') if get(handles.propTag,'Value')==1 set(handles.multiplierTag,'Enable',to); set(handles.kpTag,'Enable',to); end else set(handles.multiplierTag,'Enable',to); set(handles.kpTag,'Enable',to); end function timeStepTag_Callback(hObject, eventdata, handles) % hObject handle to timeStepTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of timeStepTag as text % str2double(get(hObject,'String')) returns contents of timeStepTag as a double % --- Executes during object creation, after setting all properties. function timeStepTag_CreateFcn(hObject, eventdata, handles) % hObject handle to timeStepTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in resetBtn. function resetBtn_Callback(hObject, eventdata, handles) % hObject handle to resetBtn (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) userData = get(handles.figure1, 'UserData'); userData.stop = true; set(handles.figure1, 'UserData',userData); enable_all(handles,'on'); % --- Executes on button press in stepTorqueTag. function stepTorqueTag_Callback(hObject, eventdata, handles) % hObject handle to stepTorqueTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of stepTorqueTag if get(hObject,'Value')==1 set(handles.propTag,'Value',0); set(handles.kpTag,'Enable','off'); set(handles.multiplierTag,'Enable','off'); set(handles.torqueTag,'Enable','on'); set(handles.torqueDurationTag,'Enable','on'); end function torqueTag_Callback(hObject, eventdata, handles) % hObject handle to torqueTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of torqueTag as text % str2double(get(hObject,'String')) returns contents of torqueTag as a double % --- Executes during object creation, after setting all properties. function torqueTag_CreateFcn(hObject, eventdata, handles) % hObject handle to torqueTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function edit13_Callback(hObject, eventdata, handles) % hObject handle to edit13 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit13 as text % str2double(get(hObject,'String')) returns contents of edit13 as a double % --- Executes during object creation, after setting all properties. function edit13_CreateFcn(hObject, eventdata, handles) % hObject handle to edit13 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in stepTorqueTag. function radiobutton2_Callback(hObject, eventdata, handles) % hObject handle to stepTorqueTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of stepTorqueTag function edit14_Callback(hObject, eventdata, handles) % hObject handle to torqueTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of torqueTag as text % str2double(get(hObject,'String')) returns contents of torqueTag as a double % --- Executes during object creation, after setting all properties. function edit14_CreateFcn(hObject, eventdata, handles) % hObject handle to torqueTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function torqueDurationTag_Callback(hObject, eventdata, handles) % hObject handle to torqueDurationTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of torqueDurationTag as text % str2double(get(hObject,'String')) returns contents of torqueDurationTag as a double % --- Executes during object creation, after setting all properties. function torqueDurationTag_CreateFcn(hObject, eventdata, handles) % hObject handle to torqueDurationTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % --- Executes on button press in propTag. function propTag_Callback(hObject, eventdata, handles) % hObject handle to propTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hint: get(hObject,'Value') returns toggle state of propTag if get(hObject,'Value')==1 set(handles.stepTorqueTag,'Value',0); set(handles.kpTag,'Enable','on'); set(handles.multiplierTag,'Enable','on'); set(handles.torqueTag,'Enable','off'); set(handles.torqueDurationTag,'Enable','off'); end function multiplierTag_Callback(hObject, eventdata, handles) % hObject handle to multiplierTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of multiplierTag as text % str2double(get(hObject,'String')) returns contents of multiplierTag as a double % --- Executes during object creation, after setting all properties. function multiplierTag_CreateFcn(hObject, eventdata, handles) % hObject handle to multiplierTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function kpTag_Callback(hObject, eventdata, handles) % hObject handle to kpTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of kpTag as text % str2double(get(hObject,'String')) returns contents of kpTag as a double % --- Executes during object creation, after setting all properties. function kpTag_CreateFcn(hObject, eventdata, handles) % hObject handle to kpTag (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end