Function: 'Gui - Name' 'Gui - Singleton' 'Gui - Openingfcn' 'Gui - Outputfcn' 'Gui - Layoutfcn' 'Gui - Callback'
Function: 'Gui - Name' 'Gui - Singleton' 'Gui - Openingfcn' 'Gui - Outputfcn' 'Gui - Layoutfcn' 'Gui - Callback'
Function: 'Gui - Name' 'Gui - Singleton' 'Gui - Openingfcn' 'Gui - Outputfcn' 'Gui - Layoutfcn' 'Gui - Callback'
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = satu_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)
a = str2num(get(handles.angka1,'String'));
b = str2num(get(handles.angka2,'String'));
hasil = a - b;
set(handles.angka3,'String',num2str(hasil));
% --- Executes on button press in kali.
function kali_Callback(hObject, eventdata, handles)
% hObject handle to kali (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
a = str2num(get(handles.angka1,'String'));
b = str2num(get(handles.angka2,'String'));
hasil = a * b;
set(handles.angka3,'String',num2str(hasil));
% --- Executes on button press in bagi.
function bagi_Callback(hObject, eventdata, handles)
% hObject handle to bagi (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
a = str2num(get(handles.angka1,'String'));
b = str2num(get(handles.angka2,'String'));
hasil = a / b;
set(handles.angka3,'String',num2str(hasil));