% --- Executes on button press in tomb_selesai.function tomb_selesai_Callback(hObject, eventdata, handles)% hObject handle to tomb_selesai (see GCBO)% eventdata reserved - to be defined in a future version of <strong>MATLAB</strong>% handles structure with handles and user data (see <strong>GUI</strong>DATA)close;% --- Executes on button press in tomb_reset.function tomb_reset_Callback(hObject, eventdata, handles)% hObject handle to tomb_reset (see GCBO)% eventdata reserved - to be defined in a future version of <strong>MATLAB</strong>% handles structure with handles and user data (see <strong>GUI</strong>DATA)set(handles.ed_input,'String','0');set(handles.ed_output,'String','0');% --- Executes on button press in tomb_lihat.function tomb_lihat_Callback(hObject, eventdata, handles)% hObject handle to tomb_lihat (see GCBO)% eventdata reserved - to be defined in a future version of <strong>MATLAB</strong>% handles structure with handles and user data (see <strong>GUI</strong>DATA)indeks=get(handles.listbox1,'Value');x=[0:30:360];teta=x*pi/180;switch indekscase 1hasil = sin(teta);case 2hasil = cos(teta);case 3hasil = tan(teta);case 4hasil = cot(teta);case 5hasil = sec(teta);case 6hasil = csc(teta);case 7hasil = asin(teta);case 8hasil = acos(teta);case 9hasil = atan(teta);case 10hasil = asec(teta);case 11hasil = acot(teta);case 12hasil = acsc(teta);endy=hasil;axes(handles.axes1);plot(x,y);xlabel('Sudut (derajat)');ylabel('Nilai');grid on;isi=get(handles.listbox1,'string');tampil=isi(indeks);set(handles.text8,'string',tampil);Universitas Sumatera Utara
<strong>Lampiran</strong> H: Fungsi M-file untuk program aplikasi Differensial dan Integralfunction varargout = Differensial_dan_Integral(varargin)% DIFFERENSIAL_DAN_INTEGRAL M-file for Differensial_dan_Integral.fig% DIFFERENSIAL_DAN_INTEGRAL, by itself, creates a new DIFFERENSIAL_DAN_INTEGRAL% or raises the existing% singleton*.%% H = DIFFERENSIAL_DAN_INTEGRAL returns the handle to a new% DIFFERENSIAL_DAN_INTEGRAL or the handle to% the existing singleton*.%% DIFFERENSIAL_DAN_INTEGRAL('CALLBACK',hObject,eventData,handles,...) calls the% local% function named CALLBACK in DIFFERENSIAL_DAN_INTEGRAL.M with the given input% arguments.%% DIFFERENSIAL_DAN_INTEGRAL('Property','Value',...) creates a new% DIFFERENSIAL_DAN_INTEGRAL or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the <strong>GUI</strong> before Differensial_dan_Integral_OpeningFunction gets% called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to Differensial_dan_Integral_OpeningFcn via% varargin.%% *See <strong>GUI</strong> Options on <strong>GUI</strong>DE's Tools menu. Choose "<strong>GUI</strong> allows only one% instance to run (singleton)".%% See also: <strong>GUI</strong>DE, <strong>GUI</strong>DATA, <strong>GUI</strong>HANDLES% Edit the above text to modify the response to help Differensial_dan_Integral% Last Modified by <strong>GUI</strong>DE v2.5 30-Aug-2007 23:12:28% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ...'gui_Singleton', gui_Singleton, ...'gui_OpeningFcn', @Differensial_dan_Integral_OpeningFcn, ...'gui_OutputFcn', @Differensial_dan_Integral_OutputFcn, ...'gui_LayoutFcn', [] , ...'gui_Callback', []);if nargin && ischar(varargin{1})gui_State.gui_Callback = str2func(varargin{1});endif nargout[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});elsegui_mainfcn(gui_State, varargin{:});end% End initialization code - DO NOT EDIT% --- Executes just before Differensial_dan_Integral is made visible.function Differensial_dan_Integral_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 <strong>MATLAB</strong>% handles structure with handles and user data (see <strong>GUI</strong>DATA)% varargin command line arguments to Differensial_dan_Integral (see VARARGIN)% Choose default command line output for Differensial_dan_Integralhandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes Differensial_dan_Integral wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = Differensial_dan_Integral_OutputFcn(hObject, eventdata, handles)% varargout cell array for returning output args (see VARARGOUT);% hObject handle to figureUniversitas Sumatera Utara