• Tidak ada hasil yang ditemukan

function varargout = Bangun_Ruang(varargin)

% BANGUN_RUANG M-file for Bangun_Ruang.fig

% BANGUN_RUANG, by itself, creates a new BANGUN_RUANG or raises the existing

% singleton*.

%

% H = BANGUN_RUANG returns the handle to a new BANGUN_RUANG or the handle to

% the existing singleton*.

%

% BANGUN_RUANG('CALLBACK',hObject,eventData,handles,...) calls the local

% function named CALLBACK in BANGUN_RUANG.M with the given input arguments.

%

% BANGUN_RUANG('Property','Value',...) creates a new BANGUN_RUANG or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before Bangun_Ruang_OpeningFunction gets called. An

% unrecognized property name or invalid value makes property application

% stop. All inputs are passed to Bangun_Ruang_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 Bangun_Ruang

% Last Modified by GUIDE v2.5 12-Sep-2007 14:33:16

% Begin initialization code - DO NOT EDIT gui_Singleton = 1;

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

function matikan(off) set(off,'Value',0);

% --- Executes just before Bangun_Ruang is made visible.

function Bangun_Ruang_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 Bangun_Ruang (see VARARGIN)

% Choose default command line output for Bangun_Ruang handles.output = hObject;

% Update handles structure guidata(hObject, handles);

% UIWAIT makes Bangun_Ruang wait for user response (see UIRESUME)

% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.

function varargout = Bangun_Ruang_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 edit1_Callback(hObject, eventdata, handles)

% hObject handle to edit1 (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 edit1 as text

% str2double(get(hObject,'String')) returns contents of edit1 as a double

% --- Executes during object creation, after setting all properties.

function edit1_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit1 (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 edit2_Callback(hObject, eventdata, handles)

% hObject handle to edit2 (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 edit2 as text

% --- Executes during object creation, after setting all properties.

function edit2_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit2 (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 TombSelesai.

function TombSelesai_Callback(hObject, eventdata, handles)

% hObject handle to TombSelesai (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) close;

% --- Executes on button press in PilKubus.

function PilKubus_Callback(hObject, eventdata, handles)

% hObject handle to PilKubus (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) nil1=get(handles.PilKubus,'value');

if nil1==1

set(handles.text2,'string','Menghitung Volume Kubus');

set(handles.text3,'string','Volume = Sisi x Sisi x Sisi');

set(handles.text4,'string','Sisi');

set(handles.text5,'string','');

set(handles.text6,'string','');

set(handles.edit1,'string','');

set(handles.edit2,'string','');

set(handles.edit3,'string','');

set(handles.EdVol,'string','');

set(handles.PilBalok,'value',0);

set(handles.PilPris,'value',0);

set(handles.PilLimTig,'value',0);

set(handles.PilLimPat,'value',0);

set(handles.PilSil,'value',0);

set(handles.PilKer,'value',0);

set(handles.PilBol,'value',0);

end

% Hint: get(hObject,'Value') returns toggle state of PilKubus

% --- Executes on button press in PilBalok.

function PilBalok_Callback(hObject, eventdata, handles)

% hObject handle to PilBalok (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) nil2=get(handles.PilBalok,'value');

if nil2==1

set(handles.text2,'string','Menghitung Volume Balok');

set(handles.text3,'string','Volume = Panjang x Lebar x Tinggi');

set(handles.text4,'string','Panjang');

set(handles.text5,'string','Lebar');

set(handles.text6,'string','Tinggi');

set(handles.edit1,'string','');

set(handles.edit2,'string','');

set(handles.edit3,'string','');

set(handles.EdVol,'string','');

set(handles.PilKubus,'value',0);

set(handles.PilPris,'value',0);

set(handles.PilLimTig,'value',0);

set(handles.PilLimPat,'value',0);

set(handles.PilSil,'value',0);

set(handles.PilKer,'value',0);

set(handles.PilBol,'value',0);

end

% Hint: get(hObject,'Value') returns toggle state of PilBalok

% --- Executes on button press in PilPris.

function PilPris_Callback(hObject, eventdata, handles)

% hObject handle to PilPris (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) nil3=get(handles.PilPris,'value');

if nil3==1

set(handles.text2,'string','Menghitung Volume Prisma Segi Tiga');

set(handles.text3,'string','Volume = (1/2 x Rusuk Sisi Alas x Tinggi Sisi Alas) x Tinggi');

set(handles.text4,'string','Rusuk Sisi Alas');

set(handles.text5,'string','Tinggi Sisi Alas');

set(handles.text6,'string','Tinggi');

set(handles.edit1,'string','');

set(handles.edit2,'string','');

set(handles.edit3,'string','');

set(handles.EdVol,'string','');

set(handles.PilKubus,'value',0);

set(handles.PilBalok,'value',0);

set(handles.PilLimTig,'value',0);

set(handles.PilLimPat,'value',0);

set(handles.PilSil,'value',0);

set(handles.PilKer,'value',0);

set(handles.PilBol,'value',0);

end

% Hint: get(hObject,'Value') returns toggle state of PilPris

% --- Executes on button press in PilLimTig.

function PilLimTig_Callback(hObject, eventdata, handles)

% hObject handle to PilLimTig (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) nil4=get(handles.PilLimTig,'value');

if nil4==1

set(handles.text2,'string','Menghitung Volume Limas Segi Tiga');

set(handles.text3,'string','Volume = 1/3 x (1/2 x Rusuk Sisi Alas x Tinggi Sisi Alas) x Tinggi');

set(handles.text4,'string','Rusuk Sisi Alas');

set(handles.text5,'string','Tinggi Sisi Alas');

set(handles.text6,'string','Tinggi');

set(handles.edit1,'string','');

set(handles.edit2,'string','');

set(handles.edit3,'string','');

set(handles.EdVol,'string','');

set(handles.PilPris,'value',0);

set(handles.PilLimPat,'value',0);

set(handles.PilSil,'value',0);

set(handles.PilKer,'value',0);

set(handles.PilBol,'value',0);

end

% Hint: get(hObject,'Value') returns toggle state of PilLimTig

% --- Executes on button press in PilLimPat.

function PilLimPat_Callback(hObject, eventdata, handles)

% hObject handle to PilLimPat (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) nil5=get(handles.PilLimPat,'value');

if nil5==1

set(handles.text2,'string','Menghitung Volume Limas Segi Empat');

set(handles.text3,'string','Volume = 1/3 x (Panjang Sisi Alas x Tinggi Sisi Alas) x Tinggi');

set(handles.text4,'string','Panjang Sisi Alas');

set(handles.text5,'string','Lebar Sisi Alas');

set(handles.text6,'string','Tinggi');

set(handles.edit1,'string','');

set(handles.edit2,'string','');

set(handles.edit3,'string','');

set(handles.EdVol,'string','');

set(handles.PilKubus,'value',0);

set(handles.PilBalok,'value',0);

set(handles.PilPris,'value',0);

set(handles.PilLimTig,'value',0);

set(handles.PilSil,'value',0);

set(handles.PilKer,'value',0);

set(handles.PilBol,'value',0);

end

% Hint: get(hObject,'Value') returns toggle state of PilLimPat

% --- Executes on button press in PilSil.

function PilSil_Callback(hObject, eventdata, handles)

% hObject handle to PilSil (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) nil6=get(handles.PilSil,'value');

if nil6==1

set(handles.text2,'string','Menghitung Volume Silinder');

set(handles.text3,'string','Volume = pi x (Jari-Jari Alas x Jari-Jari Alas) x Tinggi');

set(handles.text4,'string','Jari-Jari Alas');

set(handles.text5,'string','Tinggi');

set(handles.text6,'string','');

set(handles.edit1,'string','');

set(handles.edit2,'string','');

set(handles.edit3,'string','');

set(handles.EdVol,'string','');

set(handles.PilKubus,'value',0);

set(handles.PilBalok,'value',0);

set(handles.PilPris,'value',0);

set(handles.PilLimTig,'value',0);

set(handles.PilLimPat,'value',0);

set(handles.PilKer,'value',0);

set(handles.PilBol,'value',0);

end

% Hint: get(hObject,'Value') returns toggle state of PilSil

% --- Executes on button press in PilKer.

function PilKer_Callback(hObject, eventdata, handles)

% hObject handle to PilKer (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) nil7=get(handles.PilKer,'value');

if nil7==1

set(handles.text2,'string','Menghitung Volume Kerucut');

set(handles.text3,'string','Volume = 1/3 x(pi x (Jari-Jari Alas x Jari-Jari Alas)) x Tinggi');

set(handles.text4,'string','Jari-Jari Alas');

set(handles.text5,'string','Tinggi');

set(handles.text6,'string','');

set(handles.edit1,'string','');

set(handles.edit2,'string','');

set(handles.edit3,'string','');

set(handles.EdVol,'string','');

set(handles.PilKubus,'value',0);

set(handles.PilBalok,'value',0);

set(handles.PilPris,'value',0);

set(handles.PilLimTig,'value',0);

set(handles.PilLimPat,'value',0);

set(handles.PilSil,'value',0);

set(handles.PilBol,'value',0);

end

% Hint: get(hObject,'Value') returns toggle state of PilKer

% --- Executes on button press in PilBol.

function PilBol_Callback(hObject, eventdata, handles)

% hObject handle to PilBol (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) nil8=get(handles.PilBol,'value');

if nil8==1

set(handles.text2,'string','Menghitung Volume Bola');

set(handles.text3,'string','Volume = 4/3 xpi x (Jari-Jari Alas x Jari-Jari Alas)');

set(handles.text4,'string','Jari-Jari');

set(handles.text5,'string','');

set(handles.text6,'string','');

set(handles.edit1,'string','');

set(handles.edit2,'string','');

set(handles.edit3,'string','');

set(handles.EdVol,'string','');

set(handles.PilKubus,'value',0);

set(handles.PilBalok,'value',0);

set(handles.PilPris,'value',0);

set(handles.PilLimTig,'value',0);

set(handles.PilLimPat,'value',0);

set(handles.PilSil,'value',0);

set(handles.PilKer,'value',0);

end

% Hint: get(hObject,'Value') returns toggle state of PilBol

function EdVol_Callback(hObject, eventdata, handles)

% hObject handle to EdVol (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 EdVol as text

% str2double(get(hObject,'String')) returns contents of EdVol as a double

% --- Executes during object creation, after setting all properties.

function EdVol_CreateFcn(hObject, eventdata, handles)

% hObject handle to EdVol (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 TombReset.

function TombReset_Callback(hObject, eventdata, handles)

% hObject handle to TombReset (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) set(handles.edit1,'string','');

set(handles.EdVol,'string','');

% --- Executes on button press in TombVol.

function TombVol_Callback(hObject, eventdata, handles)

% hObject handle to TombVol (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA) nil1=get(handles.PilKubus,'value');

function edit3_Callback(hObject, eventdata, handles)

% hObject handle to edit3 (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 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)

% 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 edit7_Callback(hObject, eventdata, handles)

% hObject handle to edit2 (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 edit2 as text

% str2double(get(hObject,'String')) returns contents of edit2 as a double

% --- Executes during object creation, after setting all properties.

function edit7_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit2 (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 edit8_Callback(hObject, eventdata, handles)

% hObject handle to edit8 (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 edit8 as text

% str2double(get(hObject,'String')) returns contents of edit8 as a double

% --- Executes during object creation, after setting all properties.

function edit8_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit8 (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 edit4_Callback(hObject, eventdata, handles)

% hObject handle to edit4 (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 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)

% 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 edit5_Callback(hObject, eventdata, handles)

% hObject handle to edit2 (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 edit2 as text

% str2double(get(hObject,'String')) returns contents of edit2 as a double

% --- Executes during object creation, after setting all properties.

function edit5_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit2 (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 edit6_Callback(hObject, eventdata, handles)

% hObject handle to edit3 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% --- Executes during object creation, after setting all properties.

function edit6_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit3 (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 during object creation, after setting all properties.

function edit10_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit10 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called

% --- Executes during object creation, after setting all properties.

function edit11_CreateFcn(hObject, eventdata, handles)

% hObject handle to edit11 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB

% handles empty - handles not created until after all CreateFcns called