LAMPIRAN 1 1. Larutan 15 ppm Polystyrene ENERGI Percobaan 1 2 3 PROBABILITY 0.07 0.116 0.113 0.152 0.127 0.15 0.256 0.143 0.212 0.203 0.22 0.24 0.234 0.23 0.234 0.3 0.239 0.35 0.201 0.263 0.37 0.389 0.382 0.388 0.386 0.39 0.399 0.367 0.387 0.384 0.82 0.432 0.443 0.42 0.431 0.89 0.42 0.443 0.476 0.446 1.28 0.409 0.447 0.498 0.451 1.42 0.402 0.498 0.532 0.477 1.7 0.478 0.54 0.554 0.524 2.7 0.67 0.76 0.775 0.735 3.5 0.877 0.876 0.898 0.883 3.8 0.883 0.895 0.897 0.891 4.7 0.944 0.953 0.955 0.95 5 0.998 0.958 0.978 0.978 Rata - Rata ENERGI PROBABILITY 0.07 0.127 0.15 0.203 0.22 0.234 0.3 0.263 0.37 0.386 0.39 0.384 0.82 0.431 0.89 0.446 1.28 0.451 1.42 0.477 1.7 0.524 2.7 0.735 3.5 0.883 3.8 0.891 4.7 0.95 5 0.978
44 2. 7,5 ppm Polystyrene ENERGI(mJ) Percobaan 1 2 3 PROBABILITY 0.07 0.071 0.083 0.088 0.080 0.15 0.088 0.085 0.084 0.085 0.22 0.162 0.165 0.197 0.174 0.3 0.219 0.208 0.205 0.210 0.37 0.234 0.257 0.251 0.247 0.39 0.265 0.244 0.206 0.238 0.82 0.388 0.396 0.393 0.392 0.89 0.393 0.395 0.399 0.395 1.28 0.304 0.335 0.319 0.319 1.42 0.415 0.423 0.439 0.425 1.7 0.433 0.456 0.437 0.442 2.7 0.451 0.471 0.426 0.449 3.5 0.662 0.671 0.661 0.664 3.8 0.609 0.684 0.695 0.662 4.7 0.702 0.616 0.719 0.679 5 0.778 0.74 0.754 0.757 Nilai Rata - Rata ENERGI(mJ) PROBABILITY 0.07 0.080 0.15 0.085 0.22 0.174 0.3 0.210 0.37 0.247 0.39 0.238 0.82 0.392 0.89 0.395 1.28 0.319 1.42 0.425 1.7 0.442 2.7 0.449 3.5 0.664 3.8 0.662 4.7 0.679 5 0.757
45 3. Larutan Air Keran ENERGI (Mj) Percobaan 1 2 3 PROBABILITY 0.07 0 0 0 0 0.15 0.003 0 0 0.001 0.22 0.011 0.014 0.013 0.012 0.3 0.031 0.032 0.033 0.032 0.37 0.123 0.134 0.152 0.136 0.39 0.265 0.244 0.199 0.236 0.82 0.249 0.243 0.249 0.247 0.89 0.241 0.345 0.216 0.267 1.28 0.305 0.335 0.319 0.319 1.42 0.315 0.323 0.39 0.342 1.7 0.33 0.36 0.337 0.342 2.7 0.351 0.361 0.326 0.346 3.5 0.421 0.371 0.361 0.384 3.8 0.409 0.384 0.395 0.396 4.7 0.401 0.416 0.419 0.412 5 0.477 0.515 0.513 0.501 Nilai Rata Rata ENERGI (mj) PROBABILITY 0.07 0 0.15 0.001 0.22 0.012 0.3 0.032 0.37 0.136 0.39 0.236 0.82 0.247 0.89 0.267 1.28 0.319 1.42 0.342 1.7 0.342 2.7 0.346 3.5 0.384 3.8 0.396 4.7 0.412 5 0.501
46 4. 2 ml Air Keran + 1 ml Air Murni ENERGI (mj) Percobaan 1 2 3 PROBABILITY 0.07 0 0 0 0 0.15 0 0 0 0 0.22 0.009 0.014 0.013 0.012 0.3 0.031 0.029 0.031 0.003 0.37 0.111 0.113 0.152 0.125 0.39 0.256 0.143 0.212 0.203 0.82 0.24 0.234 0.23 0.234 0.89 0.239 0.35 0.201 0.263 1.28 0.207 0.333 0.304 0.281 1.42 0.3 0.314 0.38 0.331 1.7 0.323 0.345 0.321 0.329 2.7 0.333 0.346 0.326 0.335 3.5 0.371 0.365 0.359 0.365 3.8 0.389 0.382 0.388 0.386 4.7 0.399 0.416 0.419 0.411 5 0.489 0.5 0.49 0.493 Rata rata ENERGI (mj) PROBABILITY 0.07 0 0.15 0 0.22 0.012 0.3 0.003 0.37 0.125 0.39 0.203 0.82 0.234 0.89 0.263 1.28 0.281 1.42 0.331 1.7 0.329 2.7 0.335 3.5 0.365 3.8 0.386 4.7 0.411 5 0.493
47 5. 1 ml Air Keran + 2 ml Air Murni ENERGI (mj) Percobaan 1 2 3 PROBABILITY 0.07 0 0 0 0 0.15 0 0 0 0 0.22 0.005 0.002 0.003 0.003 0.3 0.021 0.019 0.021 0.02 0.37 0.083 0.087 0.092 0.087 0.39 0.259 0.143 0.202 0.201 0.82 0.221 0.223 0.219 0.221 0.89 0.227 0.213 0.201 0.213 1.28 0.277 0.298 0.297 0.29 1.42 0.3 0.298 0.24 0.279 1.7 0.314 0.332 0.321 0.322 2.7 0.321 0.325 0.326 0.324 3.5 0.337 0.356 0.344 0.345 3.8 0.347 0.354 0.355 0.352 4.7 0.365 0.395 0.398 0.386 5 0.456 0.487 0.402 0.448 Rata Rata ENERGI (mj) PROBABILITY 0.07 0 0.15 0 0.22 0.003 0.3 0.02 0.37 0.087 0.39 0.201 0.82 0.221 0.89 0.213 1.28 0.29 1.42 0.279 1.7 0.322 2.7 0.324 3.5 0.345 3.8 0.352 4.7 0.386 5 0.448
48 6. Air Murni ENERGI (mj) Percobaan 1 2 3 PROBABILITY 0.07 0 0 0 0 0.15 0 0 0 0 0.22 0 0 0 0 0.3 0 0 0.003 0.001 0.37 0.003 0.007 0.008 0.006 0.39 0.056 0.075 0.079 0.07 0.82 0.103 0.105 0.103 0.103 0.89 0.146 0.152 0.154 0.15 1.28 0.198 0.196 0.193 0.195 1.42 0.217 0.203 0.201 0.207 1.7 0.227 0.265 0.247 0.246 2.7 0.288 0.246 0.298 0.277 3.5 0.299 0.297 0.298 0.298 3.8 0.301 0.298 0.321 0.306 4.7 0.327 0.357 0.358 0.347 5 0.317 0.408 0.402 0.375 Rata Rata ENERGI (mj) PROBABILITY 0.07 0 0.15 0 0.22 0 0.3 0.001 0.37 0.006 0.39 0.07 0.82 0.103 0.89 0.15 1.28 0.195 1.42 0.207 1.7 0.246 2.7 0.277 3.5 0.298 3.8 0.306 4.7 0.347 5 0.375
49 7. Penggabungan ENERGI (mj) 15 ppb Polistyrene 7,5 ppb Polystyrene Air Keran 2 ml Air Keran + 1 ml Air Murni 1 ml Air Keran + 2 ml Air Murni Air Murni 0.07 0.127 0.080 0 0 0 0 0.15 0.203 0.085 0.001 0 0 0 0.22 0.234 0.174 0.012 0.012 0.003 0 0.3 0.263 0.210 0.032 0.003 0.02 0.001 0.37 0.386 0.247 0.136 0.125 0.087 0.006 0.39 0.384 0.238 0.236 0.203 0.201 0.07 0.82 0.431 0.392 0.247 0.234 0.221 0.103 0.89 0.446 0.395 0.267 0.263 0.213 0.15 1.28 0.451 0.319 0.319 0.281 0.29 0.195 1.42 0.477 0.425 0.342 0.331 0.279 0.207 1.7 0.524 0.442 0.342 0.329 0.322 0.246 2.7 0.735 0.449 0.346 0.335 0.324 0.277 3.5 0.883 0.664 0.384 0.365 0.345 0.298 3.8 0.891 0.662 0.396 0.386 0.352 0.306 4.7 0.95 0.679 0.412 0.411 0.386 0.347 5 0.978 0.757 0.501 0.493 0.448 0.375
LAMPIRAN 2 M-FILE function varargout = BENAR1(varargin) % BENAR1 M-file for BENAR1.fig % BENAR1, by itself, creates a new BENAR1 or raises the existing % singleton*. % % H = BENAR1 returns the handle to a new BENAR1 or the handle to % the existing singleton*. % % BENAR1('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in BENAR1.M with the given input arguments. % % BENAR1('Property','Value',...) creates a new BENAR1 or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before BENAR1_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to BENAR1_OpeningFcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help BENAR1 % Last Modified by GUIDE v2.5 07-Apr-2015 14:53:24 % Begin initialization code - DO NOT EDIT gui_singleton = 1;
51 gui_state = struct('gui_name', mfilename,... 'gui_singleton', gui_singleton,... 'gui_openingfcn', @BENAR1_OpeningFcn,... 'gui_outputfcn', @BENAR1_OutputFcn,... 'gui_layoutfcn', [],... 'gui_callback', []); if nargin && ischar(varargin{1}) gui_state.gui_callback = str2func(varargin{1}); if nargout [varargout{1:nargout}] = gui_mainfcn(gui_state, varargin{:}); else gui_mainfcn(gui_state, varargin{:}); % End initialization code - DO NOT EDIT % --- Executes just before BENAR1 is made visible. function BENAR1_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hobject handle to figure % varargin command line arguments to BENAR1 (see VARARGIN) % Choose default command line output for BENAR1 handles.output = hobject; % Update handles structure guidata(hobject, handles);
52 % UIWAIT makes BENAR1 wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = BENAR1_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hobject handle to figure % Get default command line output from handles structure varargout{1} = handles.output; % --- Executes on button press in pushbutton1. function pushbutton1_callback(hobject, eventdata, handles) % hobject handle to pushbutton1 (see GCBO) [nama_file,nama_path] = uigetfile({'*.jpg';'*.bmp';'*.png';'*.tif'}); if ~isequal(nama_file,0) else return set (handles.edit1,'string',nama_file) guidata(hobject,handles); function edit1_callback(hobject, eventdata, handles) % hobject handle to edit1 (see GCBO)
53 % Hints: get(hobject,'string') returns contents of edit1 as text % str2double(get(hobject,'string')) returns contents of edit1 as a double input=get(hobject,'string'); guidata(hobject,handles); % --- Executes during object creation, after setting all properties. function edit1_createfcn(hobject, eventdata, handles) % hobject handle to edit1 (see GCBO) % 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'); function edit2_callback(hobject, eventdata, handles) % hobject handle to edit2 (see GCBO) % Hints: get(hobject,'string') returns contents of edit2 as text % str2double(get(hobject,'string')) returns contents of edit2 as a double input=get(hobject,'string'); guidata(hobject,handles);
54 % --- Executes during object creation, after setting all properties. function edit2_createfcn(hobject, eventdata, handles) % hobject handle to edit2 (see GCBO) % 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'); function edit3_callback(hobject, eventdata, handles) % hobject handle to edit3 (see GCBO) % Hints: get(hobject,'string') returns contents of edit3 as text % str2double(get(hobject,'string')) returns contents of edit3 as a double % --- Executes during object creation, after setting all properties. function edit3_createfcn(hobject, eventdata, handles) % hobject handle to edit3 (see GCBO) % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.
55 if ispc && isequal(get(hobject,'backgroundcolor'), get(0,'defaultuicontrolbackgroundcolor')) set(hobject,'backgroundcolor','white'); function edit4_callback(hobject, eventdata, handles) % hobject handle to edit4 (see GCBO) % Hints: get(hobject,'string') returns contents of edit4 as text % str2double(get(hobject,'string')) returns contents of edit4 as a double % --- Executes during object creation, after setting all properties. function edit4_createfcn(hobject, eventdata, handles) % hobject handle to edit4 (see GCBO) % 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'); function edit5_callback(hobject, eventdata, handles) % hobject handle to edit5 (see GCBO)
56 % Hints: get(hobject,'string') returns contents of edit5 as text % str2double(get(hobject,'string')) returns contents of edit5 as a double % --- Executes during object creation, after setting all properties. function edit5_createfcn(hobject, eventdata, handles) % hobject handle to edit5 (see GCBO) % 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'); % --- Executes on button press in pushbutton2. function pushbutton2_callback(hobject, eventdata, handles) lebarx=str2num(get(handles.edit2,'string')); lebary=str2num(get(handles.edit3,'string')); startx=str2num(get(handles.edit4,'string')); starty=str2num(get(handles.edit5,'string')); for a=1:9 no=num2str(a); ggg=['img 000',no,'.jpg']; jumlahpeak(a)=duaa1(ggg,lebarx,lebary,startx,starty); for a=10:99
57 no=num2str(a); ggg=['img 00',no,'.jpg']; jumlahpeak(a)=duaa1(ggg,lebarx,lebary,startx,starty); for a=100:999 no=num2str(a); ggg=['img 0',no,'.jpg']; jumlahpeak(a)=duaa1(ggg,lebarx,lebary,startx,starty); for a=1000 no=num2str(a); ggg=['img ',no,'.jpg']; jumlahpeak(a)=duaa1(ggg,lebarx,lebary,startx,starty); guidata(hobject,handles); axes(handles.axes1); plot(jumlahpeak,'*'); threshold=str2num(get(handles.edit7,'string')); jumlahpeak1 = zeros(length(jumlahpeak)); for a = 1:length(jumlahpeak) if jumlahpeak(a) >= threshold; jumlahpeak1(a) = jumlahpeak(a); guidata(hobject,handles); axes(handles.axes1); plot(jumlahpeak1,'*'); hitung=0; for i=1:length(jumlahpeak1)
58 if jumlahpeak1(i) > 0 hitung = hitung+1; hitungstr=num2str(hitung); set(handles.edit6,'string',hitungstr); guidata(hobject,handles); display(hitung); function edit6_callback(hobject, eventdata, handles) % hobject handle to edit6 (see GCBO) % Hints: get(hobject,'string') returns contents of edit6 as text % str2double(get(hobject,'string')) returns contents of edit6 as a double % --- Executes during object creation, after setting all properties. function edit6_createfcn(hobject, eventdata, handles) % hobject handle to edit6 (see GCBO) % 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');
59 function edit7_callback(hobject, eventdata, handles) % hobject handle to edit7 (see GCBO) % Hints: get(hobject,'string') returns contents of edit7 as text % str2double(get(hobject,'string')) returns contents of edit7 as a double % --- Executes during object creation, after setting all properties. function edit7_createfcn(hobject, eventdata, handles) % hobject handle to edit7 (see GCBO) % 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');