You are on page 1of 22

TUTORIAL MATLAB 3

OLEH

MARDIONO RAJAGUKGUK
1504115773
ILMU KELAUTAN
1.Kita membuka aplikasi matlab lalu mengetik guide dan mengklik oke
2.Lembar kerja kita akan terbuka
3. Kita akan menggunakan
- static text untuk membuat judul atau nama
-edit text untuk memasukan nilai pada lembar kerja kalkulator
- panel untuk membuat group
-slider untuk menentukan nilai dengan menggeser tombol pada slider
-axes untuk membuat grafik
-push button untuk membuat tombol pada lembar kerja kita / meng OK kan
4.Kemudian kita akan memasukan rumus dengan mengklik kanan pada push botton lalu memilih view
callbacks dan memilih callback, kemudi isi rumus

5. Lalu kita meRUN kan , masukan angka dan setelah selesai coba juga reset dan exit untuk melihat
apakah rumus kita benar
TERIMAKASIH
function varargout = MMMMMMM(varargin) % This function has no output args, see
% MMMMMMM M-file for MMMMMMM.fig OutputFcn.
% MMMMMMM, by itself, creates a new % hObject handle to figure
MMMMMMM or raises the existing % eventdata reserved - to be defined in a
% singleton*. future version of MATLAB
% % handles structure with handles and user
% H = MMMMMMM returns the handle to a data (see GUIDATA)
new MMMMMMM or the handle to % varargin command line arguments to
% the existing singleton*. MMMMMMM (see VARARGIN)
%
% % Choose default command line output for
MMMMMMM('CALLBACK',hObject,eventData,handles MMMMMMM
,...) calls the local handles.output = hObject;
% function named CALLBACK in MMMMMMM.M
with the given input arguments. % Update handles structure
% guidata(hObject, handles);
% MMMMMMM('Property','Value',...)
creates a new MMMMMMM or raises the % UIWAIT makes MMMMMMM wait for user
% existing singleton*. Starting from response (see UIRESUME)
the left, property value pairs are % uiwait(handles.figure1);
% applied to the GUI before
MMMMMMM_OpeningFcn gets called. An
% unrecognized property name or invalid % --- Outputs from this function are
value makes property application returned to the command line.
% stop. All inputs are passed to function varargout =
MMMMMMM_OpeningFcn via varargin. MMMMMMM_OutputFcn(hObject, eventdata,
% handles)
% *See GUI Options on GUIDE's Tools % varargout cell array for returning output
menu. Choose "GUI allows only one args (see VARARGOUT);
% instance to run (singleton)". % hObject handle to figure
% % eventdata reserved - to be defined in a
% See also: GUIDE, GUIDATA, GUIHANDLES future version of MATLAB
% handles structure with handles and user
% Edit the above text to modify the response data (see GUIDATA)
to help MMMMMMM
% Get default command line output from
% Last Modified by GUIDE v2.5 01-Jun-2016 handles structure
01:09:54 varargout{1} = handles.output;

% Begin initialization code - DO NOT EDIT


gui_Singleton = 1; % --- Executes on button press in
gui_State = struct('gui_Name', pushbutton4.
mfilename, ... function pushbutton4_Callback(hObject,
'gui_Singleton', eventdata, handles)
gui_Singleton, ... % hObject handle to pushbutton4 (see
'gui_OpeningFcn', GCBO)
@MMMMMMM_OpeningFcn, ... % eventdata reserved - to be defined in a
'gui_OutputFcn', future version of MATLAB
@MMMMMMM_OutputFcn, ... % handles structure with handles and user
'gui_LayoutFcn', [] , data (see GUIDATA)
... pbalok=str2double(get(handles.edit28,'String
'gui_Callback', []); '));
if nargin && ischar(varargin{1}) lbalok=str2double(get(handles.edit29,'String
gui_State.gui_Callback = '));
str2func(varargin{1}); tbalok=str2double(get(handles.edit30,'String
end '));
rkubus=str2double(get(handles.edit31,'String
if nargout '));
[varargout{1:nargout}] = jbola=str2double(get(handles.edit32,'String'
gui_mainfcn(gui_State, varargin{:}); ));
else ttabung=str2double(get(handles.edit33,'Strin
gui_mainfcn(gui_State, varargin{:}); g'));
end rtabung=str2double(get(handles.edit34,'Strin
% End initialization code - DO NOT EDIT g'));
rkerucut=str2double(get(handles.edit35,'Stri
ng'));
% --- Executes just before MMMMMMM is made skerucut=str2double(get(handles.edit36,'Stri
visible. ng'));
function MMMMMMM_OpeningFcn(hObject, tkerucut=str2double(get(handles.edit37,'Stri
eventdata, handles, varargin) ng'));
luaspermukaanbalok=2*((pbalok.*lbalok)+(pbal % hObject handle to pushbutton5 (see
ok.*tbalok)+(lbalok.*tbalok)); GCBO)
panjangrusukblok=4*(pbalok+lbalok+tbalok); % eventdata reserved - to be defined in a
diagonalruangbalok=sqrt((pbalok.^2)+(lbalok. future version of MATLAB
^2)+(tbalok.^2)); % handles structure with handles and user
volumebalok=pbalok.*lbalok.*tbalok; data (see GUIDATA)
luaspermukaankubus=6*(rkubus.*rkubus); set(handles.edit28,'String',0);
panjangrusukkubus=12.*rkubus; set(handles.edit29,'String',0);
diagonalbidangkubus=rkubus*(sqrt(2)); set(handles.edit30,'String',0);
diagonalruangkubus=rkubus*(sqrt(3)); set(handles.edit31,'String',0);
volumekubus=rkubus.^3; set(handles.edit32,'String',0);
luaspermukaanbola=4.*22/7.*jbola.*jbola; set(handles.edit33,'String',0);
volumebola=4/3.*22/7.*jbola.*jbola.*jbola; set(handles.edit34,'String',0);
luaspermukaantabung=2.*22/7.*rtabung.*(ttabu set(handles.edit35,'String',0);
ng+rtabung); set(handles.edit36,'String',0);
luasselimuttabung=2.*22/7.*rtabung.*ttabung; set(handles.edit37,'String',0);
luaspermukaantanpatabung=(22/7*rtabung.*rtab set(handles.edit38,'String',0);
ung)+(luasselimuttabung); set(handles.edit39,'String',0);
volumetabung=22/7*rtabung.*rtabung.*ttabung; set(handles.edit40,'String',0);
luasselimutkerucut=22/7*rkerucut.*skerucut; set(handles.edit41,'String',0);
luaspermukaankerucut=(22/7*rkerucut.*rkerucu set(handles.edit42,'String',0);
t)+(luasselimutkerucut); set(handles.edit43,'String',0);
volumekerucut=1/3*22/7*rkerucut.*rkerucut.*t set(handles.edit44,'String',0);
kerucut; set(handles.edit45,'String',0);
r2kerucut=(skerucut.^2)-(tkerucut.^2); set(handles.edit46,'String',0);
t2kerucut=(skerucut.^2)-(rkerucut.^2); set(handles.edit47,'String',0);
s2kerucut=(tkerucut.^2)+(rkerucut.^2); set(handles.edit48,'String',0);
set(handles.edit38,'String',luaspermukaankub set(handles.edit49,'String',0);
us); set(handles.edit50,'String',0);
set(handles.edit39,'String',panjangrusukkubu set(handles.edit51,'String',0);
s); set(handles.edit52,'String',0);
set(handles.edit40,'String',diagonalbidangku set(handles.edit53,'String',0);
bus); set(handles.edit54,'String',0);
set(handles.edit41,'String',diagonalruangkub set(handles.edit55,'String',0);
us); set(handles.edit56,'String',0);
set(handles.edit42,'String',volumekubus); set(handles.edit57,'String',0);
set(handles.edit58,'String',0);
set(handles.edit43,'String',luaspermukaanbal
ok); % --- Executes on button press in
set(handles.edit44,'String',panjangrusukblok pushbutton6.
); function pushbutton6_Callback(hObject,
set(handles.edit45,'String',diagonalruangbal eventdata, handles)
ok); % hObject handle to pushbutton6 (see
set(handles.edit46,'String',volumebalok); GCBO)
% eventdata reserved - to be defined in a
set(handles.edit47,'String',luaspermukaanbol future version of MATLAB
a); % handles structure with handles and user
set(handles.edit48,'String',volumebola); data (see GUIDATA)
close
set(handles.edit49,'String',luaspermukaantab
ung); % --- Executes on button press in
set(handles.edit50,'String',luasselimuttabun pushbutton7.
g); function pushbutton7_Callback(hObject,
set(handles.edit51,'String',luaspermukaantan eventdata, handles)
patabung); % hObject handle to pushbutton7 (see
set(handles.edit52,'String',volumetabung); GCBO)
% eventdata reserved - to be defined in a
set(handles.edit53,'String',luasselimutkeruc future version of MATLAB
ut); % handles structure with handles and user
set(handles.edit54,'String',luaspermukaanker data (see GUIDATA)
ucut); quit
set(handles.edit55,'String',volumekerucut);
set(handles.edit56,'String',r2kerucut); % --- Executes on button press in
set(handles.edit57,'String',t2kerucut); pushbutton1.
set(handles.edit58,'String',s2kerucut); function pushbutton1_Callback(hObject,
eventdata, handles)
% --- Executes on button press in % hObject handle to pushbutton1 (see
pushbutton5. GCBO)
function pushbutton5_Callback(hObject, % eventdata reserved - to be defined in a
eventdata, handles) future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)
ivektoru=str2double(get(handles.edit1,'Strin set(handles.edit1,'String',0);
g')); set(handles.edit2,'String',0);
jvektoru=str2double(get(handles.edit2,'Strin set(handles.edit3,'String',0);
g')); set(handles.edit4,'String',0);
ivektorv=str2double(get(handles.edit3,'Strin set(handles.edit5,'String',0);
g')); set(handles.edit6,'String',0);
jvektorv=str2double(get(handles.edit4,'Strin set(handles.edit7,'String',0);
g')); set(handles.edit8,'String',0);
x=0;y=0;
ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt axes(handles.axes1);
orv); plot(x,y)
panjangu=sqrt((ivektoru.^2)+(jvektoru.^2));
panjangv=sqrt((ivektorv.^2)+(jvektorv.^2));
sudutuv=acosd((ukaliv)/(panjangu.*panjangv))
; function edit5_Callback(hObject, eventdata,
resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2 handles)
*panjangu.*panjangv).*cosd(sudutuv)); % hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a
set(handles.edit5,'String',panjangu); future version of MATLAB
set(handles.edit6,'String',panjangv); % handles structure with handles and user
set(handles.edit7,'String',sudutuv); data (see GUIDATA)
set(handles.edit8,'String',resultanuv); ivektoru=str2double(get(handles.edit1,'Strin
g'));
jvektoru=str2double(get(handles.edit2,'Strin
% --- Executes on button press in g'));
pushbutton2. ivektorv=str2double(get(handles.edit3,'Strin
function pushbutton2_Callback(hObject, g'));
eventdata, handles) jvektorv=str2double(get(handles.edit4,'Strin
% hObject handle to pushbutton2 (see g'));
GCBO)
% eventdata reserved - to be defined in a ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt
future version of MATLAB orv);
% handles structure with handles and user panjangu=sqrt((ivektoru.^2)+(jvektoru.^2));
data (see GUIDATA) panjangv=sqrt((ivektorv.^2)+(jvektorv.^2));
ivektoru=str2double(get(handles.edit1,'Strin sudutuv=acosd((ukaliv)/(panjangu.*panjangv))
g')); ;
jvektoru=str2double(get(handles.edit2,'Strin resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2
g')); *panjangu.*panjangv).*cosd(sudutuv));
ivektorv=str2double(get(handles.edit3,'Strin % Hints: get(hObject,'String') returns
g')); contents of edit5 as text
jvektorv=str2double(get(handles.edit4,'Strin % str2double(get(hObject,'String'))
g')); returns contents of edit5 as a double

ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt
orv); % --- Executes during object creation, after
panjangu=sqrt((ivektoru.^2)+(jvektoru.^2)); setting all properties.
panjangv=sqrt((ivektorv.^2)+(jvektorv.^2)); function edit5_CreateFcn(hObject, eventdata,
sudutuv=acosd((ukaliv)/(panjangu.*panjangv)) handles)
; % hObject handle to edit5 (see GCBO)
resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2 % eventdata reserved - to be defined in a
*panjangu.*panjangv).*cosd(sudutuv)); future version of MATLAB
% handles empty - handles not created
x=[0,ivektoru]; until after all CreateFcns called
y=[0,jvektoru];
x1=[0,ivektorv]; % Hint: edit controls usually have a white
y1=[0,jvektorv]; background on Windows.
axes(handles.axes1); % See ISPC and COMPUTER.
plot(x,y,x1,y1); if ispc &&
legend('xi','xii','3'); isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
% --- Executes on button press in set(hObject,'BackgroundColor','white');
pushbutton3. end
function pushbutton3_Callback(hObject,
eventdata, handles)
% hObject handle to pushbutton3 (see
GCBO) function edit6_Callback(hObject, eventdata,
% eventdata reserved - to be defined in a handles)
future version of MATLAB % hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2
future version of MATLAB *panjangu.*panjangv).*cosd(sudutuv));
% handles structure with handles and user % Hints: get(hObject,'String') returns
data (see GUIDATA) contents of edit7 as text
ivektoru=str2double(get(handles.edit1,'Strin % str2double(get(hObject,'String'))
g')); returns contents of edit7 as a double
jvektoru=str2double(get(handles.edit2,'Strin
g'));
ivektorv=str2double(get(handles.edit3,'Strin % --- Executes during object creation, after
g')); setting all properties.
jvektorv=str2double(get(handles.edit4,'Strin function edit7_CreateFcn(hObject, eventdata,
g')); handles)
% hObject handle to edit7 (see GCBO)
ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt % eventdata reserved - to be defined in a
orv); future version of MATLAB
panjangu=sqrt((ivektoru.^2)+(jvektoru.^2)); % handles empty - handles not created
panjangv=sqrt((ivektorv.^2)+(jvektorv.^2)); until after all CreateFcns called
sudutuv=acosd((ukaliv)/(panjangu.*panjangv))
; % Hint: edit controls usually have a white
resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2 background on Windows.
*panjangu.*panjangv).*cosd(sudutuv)); % See ISPC and COMPUTER.
% Hints: get(hObject,'String') returns if ispc &&
contents of edit6 as text isequal(get(hObject,'BackgroundColor'),
% str2double(get(hObject,'String')) get(0,'defaultUicontrolBackgroundColor'))
returns contents of edit6 as a double set(hObject,'BackgroundColor','white');
end

% --- Executes during object creation, after


setting all properties.
function edit6_CreateFcn(hObject, eventdata, function edit8_Callback(hObject, eventdata,
handles) handles)
% hObject handle to edit6 (see GCBO) % hObject handle to edit8 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles structure with handles and user
until after all CreateFcns called data (see GUIDATA)
ivektoru=str2double(get(handles.edit1,'Strin
% Hint: edit controls usually have a white g'));
background on Windows. jvektoru=str2double(get(handles.edit2,'Strin
% See ISPC and COMPUTER. g'));
if ispc && ivektorv=str2double(get(handles.edit3,'Strin
isequal(get(hObject,'BackgroundColor'), g'));
get(0,'defaultUicontrolBackgroundColor')) jvektorv=str2double(get(handles.edit4,'Strin
set(hObject,'BackgroundColor','white'); g'));
end
ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt
orv);
panjangu=sqrt((ivektoru.^2)+(jvektoru.^2));
function edit7_Callback(hObject, eventdata, panjangv=sqrt((ivektorv.^2)+(jvektorv.^2));
handles) sudutuv=acosd((ukaliv)/(panjangu.*panjangv))
% hObject handle to edit7 (see GCBO) ;
% eventdata reserved - to be defined in a resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2
future version of MATLAB *panjangu.*panjangv).*cosd(sudutuv));
% handles structure with handles and user % Hints: get(hObject,'String') returns
data (see GUIDATA) contents of edit8 as text
ivektoru=str2double(get(handles.edit1,'Strin % str2double(get(hObject,'String'))
g')); returns contents of edit8 as a double
jvektoru=str2double(get(handles.edit2,'Strin
g'));
ivektorv=str2double(get(handles.edit3,'Strin % --- Executes during object creation, after
g')); setting all properties.
jvektorv=str2double(get(handles.edit4,'Strin function edit8_CreateFcn(hObject, eventdata,
g')); handles)
% hObject handle to edit8 (see GCBO)
ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt % eventdata reserved - to be defined in a
orv); future version of MATLAB
panjangu=sqrt((ivektoru.^2)+(jvektoru.^2)); % handles empty - handles not created
panjangv=sqrt((ivektorv.^2)+(jvektorv.^2)); until after all CreateFcns called
sudutuv=acosd((ukaliv)/(panjangu.*panjangv))
; % Hint: edit controls usually have a white
background on Windows.
% See ISPC and COMPUTER.
if ispc && function edit25_Callback(hObject, eventdata,
isequal(get(hObject,'BackgroundColor'), handles)
get(0,'defaultUicontrolBackgroundColor')) % hObject handle to edit25 (see GCBO)
set(hObject,'BackgroundColor','white'); % eventdata reserved - to be defined in a
end future version of MATLAB
% handles structure with handles and user
data (see GUIDATA)
Slider1Value=num2str(get(handles.slider1,'Va
function edit24_Callback(hObject, eventdata, lue'));
handles) set(handles.edit9,'String',slider1Value);
% hObject handle to edit24 (see GCBO)
% eventdata reserved - to be defined in a sudutslider=str2double(get(handles.edit9,'St
future version of MATLAB ring'));
% handles structure with handles and user kecslider=str2double(get(handles.edit10,'Str
data (see GUIDATA) ing'));
Slider1Value=num2str(get(handles.slider1,'Va sinsudut=sind(sudutslider);
lue')); cossudut=cosd(sudutslider);
set(handles.edit9,'String',slider1Value); xmaks=((kecslider.^2)*(2*sinsudut.*cossudut)
)/(10);
sudutslider=str2double(get(handles.edit9,'St ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10);
ring')); txmaks=((2*kecslider.*sinsudut)/10);
kecslider=str2double(get(handles.edit10,'Str tymaks=((kecslider.*sinsudut)/10);
ing'));
sinsudut=sind(sudutslider); set(handles.edit24,'String',xmaks);
cossudut=cosd(sudutslider); set(handles.edit25,'String',ymaks);
xmaks=((kecslider.^2)*(2*sinsudut.*cossudut) set(handles.edit26,'String',txmaks);
)/(10); set(handles.edit27,'String',tymaks);
ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10);
txmaks=((2*kecslider.*sinsudut)/10); voy=kecslider.*sinsudut;
tymaks=((kecslider.*sinsudut)/10); vox=kecslider.*cossudut;
t=0:txmaks/100:txmaks;
set(handles.edit24,'String',xmaks); y=(voy.*t)-(0.5*10*(t.^2));
set(handles.edit25,'String',ymaks); x=vox.*t;
set(handles.edit26,'String',txmaks); axes(handles.axes2) ;plot(x,y) ;
set(handles.edit27,'String',tymaks);
% Hints: get(hObject,'String') returns
voy=kecslider.*sinsudut; contents of edit25 as text
vox=kecslider.*cossudut; % str2double(get(hObject,'String'))
t=0:txmaks/100:txmaks; returns contents of edit25 as a double
y=(voy.*t)-(0.5*10*(t.^2));
x=vox.*t;
axes(handles.axes2) ;plot(x,y) ; % --- Executes during object creation, after
setting all properties.
function edit25_CreateFcn(hObject,
% Hints: get(hObject,'String') returns eventdata, handles)
contents of edit24 as text % hObject handle to edit25 (see GCBO)
% str2double(get(hObject,'String')) % eventdata reserved - to be defined in a
returns contents of edit24 as a double future version of MATLAB
% handles empty - handles not created
until after all CreateFcns called
% --- Executes during object creation, after
setting all properties. % Hint: edit controls usually have a white
function edit24_CreateFcn(hObject, background on Windows.
eventdata, handles) % See ISPC and COMPUTER.
% hObject handle to edit24 (see GCBO) if ispc &&
% eventdata reserved - to be defined in a isequal(get(hObject,'BackgroundColor'),
future version of MATLAB get(0,'defaultUicontrolBackgroundColor'))
% handles empty - handles not created set(hObject,'BackgroundColor','white');
until after all CreateFcns called end

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER. function edit26_Callback(hObject, eventdata,
if ispc && handles)
isequal(get(hObject,'BackgroundColor'), % hObject handle to edit26 (see GCBO)
get(0,'defaultUicontrolBackgroundColor')) % eventdata reserved - to be defined in a
set(hObject,'BackgroundColor','white'); future version of MATLAB
end % handles structure with handles and user
data (see GUIDATA)
Slider1Value=num2str(get(handles.slider1,'Va cossudut=cosd(sudutslider);
lue')); xmaks=((kecslider.^2)*(2*sinsudut.*cossudut)
set(handles.edit9,'String',slider1Value); )/(10);
ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10);
sudutslider=str2double(get(handles.edit9,'St txmaks=((2*kecslider.*sinsudut)/10);
ring')); tymaks=((kecslider.*sinsudut)/10);
kecslider=str2double(get(handles.edit10,'Str
ing')); set(handles.edit24,'String',xmaks);
sinsudut=sind(sudutslider); set(handles.edit25,'String',ymaks);
cossudut=cosd(sudutslider); set(handles.edit26,'String',txmaks);
xmaks=((kecslider.^2)*(2*sinsudut.*cossudut) set(handles.edit27,'String',tymaks);
)/(10);
ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10); voy=kecslider.*sinsudut;
txmaks=((2*kecslider.*sinsudut)/10); vox=kecslider.*cossudut;
tymaks=((kecslider.*sinsudut)/10); t=0:txmaks/100:txmaks;
y=(voy.*t)-(0.5*10*(t.^2));
set(handles.edit24,'String',xmaks); x=vox.*t;
set(handles.edit25,'String',ymaks); axes(handles.axes2) ;plot(x,y) ;
set(handles.edit26,'String',txmaks);
set(handles.edit27,'String',tymaks); % Hints: get(hObject,'String') returns
contents of edit27 as text
voy=kecslider.*sinsudut; % str2double(get(hObject,'String'))
vox=kecslider.*cossudut; returns contents of edit27 as a double
t=0:txmaks/100:txmaks;
y=(voy.*t)-(0.5*10*(t.^2));
x=vox.*t; % --- Executes during object creation, after
axes(handles.axes2) ;plot(x,y) ; setting all properties.
function edit27_CreateFcn(hObject,
% Hints: get(hObject,'String') returns eventdata, handles)
contents of edit26 as text % hObject handle to edit27 (see GCBO)
% str2double(get(hObject,'String')) % eventdata reserved - to be defined in a
returns contents of edit26 as a double future version of MATLAB
% handles empty - handles not created
until after all CreateFcns called
% --- Executes during object creation, after
setting all properties. % Hint: edit controls usually have a white
function edit26_CreateFcn(hObject, background on Windows.
eventdata, handles) % See ISPC and COMPUTER.
% hObject handle to edit26 (see GCBO) if ispc &&
% eventdata reserved - to be defined in a isequal(get(hObject,'BackgroundColor'),
future version of MATLAB get(0,'defaultUicontrolBackgroundColor'))
% handles empty - handles not created set(hObject,'BackgroundColor','white');
until after all CreateFcns called end

% Hint: edit controls usually have a white


background on Windows. % --- Executes on slider movement.
% See ISPC and COMPUTER. function slider1_Callback(hObject,
if ispc && eventdata, handles)
isequal(get(hObject,'BackgroundColor'), % hObject handle to slider1 (see GCBO)
get(0,'defaultUicontrolBackgroundColor')) % eventdata reserved - to be defined in a
set(hObject,'BackgroundColor','white'); future version of MATLAB
end % handles structure with handles and user
data (see GUIDATA)
slider1Value=num2str(get(handles.slider1,'Va
lue'));
function edit27_Callback(hObject, eventdata, set(handles.edit9,'String',slider1Value);
handles)
% hObject handle to edit27 (see GCBO) sudutslider=str2double(get(handles.edit9,'St
% eventdata reserved - to be defined in a ring'));
future version of MATLAB kecslider=str2double(get(handles.edit10,'Str
% handles structure with handles and user ing'));
data (see GUIDATA) sinsudut=sind(sudutslider);
Slider1Value=num2str(get(handles.slider1,'Va cossudut=cosd(sudutslider);
lue')); xmaks=((kecslider.^2)*(2*sinsudut.*cossudut)
set(handles.edit9,'String',slider1Value); )/(10);
ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10);
sudutslider=str2double(get(handles.edit9,'St txmaks=((2*kecslider.*sinsudut)/10);
ring')); tymaks=((kecslider.*sinsudut)/10);
kecslider=str2double(get(handles.edit10,'Str
ing')); set(handles.edit24,'String',xmaks);
sinsudut=sind(sudutslider); set(handles.edit25,'String',ymaks);
set(handles.edit26,'String',txmaks);
set(handles.edit27,'String',tymaks);
% Hints: get(hObject,'Value') returns
voy=kecslider.*sin(sudutslider*pi/180); position of slider
t=0:txmaks/100:txmaks; % get(hObject,'Min') and
y=voy.*t-0.5*10*t.^2; get(hObject,'Max') to determine range of
x=kecslider*t; slider
axes(handles.axes2) ;plot(x,y) ;

% --- Executes during object creation, after


% Hints: get(hObject,'Value') returns setting all properties.
position of slider function slider2_CreateFcn(hObject,
% get(hObject,'Min') and eventdata, handles)
get(hObject,'Max') to determine range of % hObject handle to slider2 (see GCBO)
slider % eventdata reserved - to be defined in a
future version of MATLAB
% handles empty - handles not created
% --- Executes during object creation, after until after all CreateFcns called
setting all properties.
function slider1_CreateFcn(hObject, % Hint: slider controls usually have a light
eventdata, handles) gray background.
% hObject handle to slider1 (see GCBO) if isequal(get(hObject,'BackgroundColor'),
% eventdata reserved - to be defined in a get(0,'defaultUicontrolBackgroundColor'))
future version of MATLAB set(hObject,'BackgroundColor',[.9 .9
% handles empty - handles not created .9]);
until after all CreateFcns called end

% Hint: slider controls usually have a light


gray background.
if isequal(get(hObject,'BackgroundColor'), function edit9_Callback(hObject, eventdata,
get(0,'defaultUicontrolBackgroundColor')) handles)
set(hObject,'BackgroundColor',[.9 .9 % hObject handle to edit9 (see GCBO)
.9]); % eventdata reserved - to be defined in a
end future version of MATLAB
% handles structure with handles and user
data (see GUIDATA)
% --- Executes on slider movement. Slider1Value=num2str(get(handles.slider1,'Va
function slider2_Callback(hObject, lue'));
eventdata, handles) set(handles.edit9,'String',slider1Value);
% hObject handle to slider2 (see GCBO)
% eventdata reserved - to be defined in a sudutslider=str2double(get(handles.edit9,'St
future version of MATLAB ring'));
% handles structure with handles and user kecslider=str2double(get(handles.edit10,'Str
data (see GUIDATA) ing'));
Slider2Value=num2str(get(handles.slider2,'Va sinsudut=sind(sudutslider);
lue')); cossudut=cosd(sudutslider);
set(handles.edit10,'String',slider2Value); xmaks=((kecslider.^2)*(2*sinsudut.*cossudut)
)/(10);
sudutslider=str2double(get(handles.edit9,'St ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10);
ring')); txmaks=((2*kecslider.*sinsudut)/10);
kecslider=str2double(get(handles.edit10,'Str tymaks=((kecslider.*sinsudut)/10);
ing'));
sinsudut=sind(sudutslider); set(handles.edit24,'String',xmaks);
cossudut=cosd(sudutslider); set(handles.edit25,'String',ymaks);
xmaks=((kecslider.^2)*(2*sinsudut.*cossudut) set(handles.edit26,'String',txmaks);
)/(10); set(handles.edit27,'String',tymaks);
ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10);
txmaks=((2*kecslider.*sinsudut)/10); voy=kecslider.*sin(sudutslider*pi/180);
tymaks=((kecslider.*sinsudut)/10); t=0:txmaks/100:txmaks;
y=voy.*t-0.5*10*t.^2;
set(handles.edit24,'String',xmaks); x=kecslider*t;
set(handles.edit25,'String',ymaks); axes(handles.axes2) ;plot(x,y) ;
set(handles.edit26,'String',txmaks);
set(handles.edit27,'String',tymaks); % Hints: get(hObject,'String') returns
contents of edit9 as text
voy=kecslider.*sinsudut; % str2double(get(hObject,'String'))
vox=kecslider.*cossudut; returns contents of edit9 as a double
t=0:txmaks/100:txmaks;
y=(voy.*t)-(0.5*10*(t.^2));
x=vox.*t; % --- Executes during object creation, after
axes(handles.axes2) ;plot(x,y) ; setting all properties.
function edit9_CreateFcn(hObject, eventdata, % See ISPC and COMPUTER.
handles) if ispc &&
% hObject handle to edit9 (see GCBO) isequal(get(hObject,'BackgroundColor'),
% eventdata reserved - to be defined in a get(0,'defaultUicontrolBackgroundColor'))
future version of MATLAB set(hObject,'BackgroundColor','white');
% handles empty - handles not created end
until after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows. function edit32_Callback(hObject, eventdata,
% See ISPC and COMPUTER. handles)
if ispc && % hObject handle to edit32 (see GCBO)
isequal(get(hObject,'BackgroundColor'), % eventdata reserved - to be defined in a
get(0,'defaultUicontrolBackgroundColor')) future version of MATLAB
set(hObject,'BackgroundColor','white'); % handles structure with handles and user
end data (see GUIDATA)
jbola=str2double(get(handles.edit32,'String'
));
luaspermukaanbola=4.*22/7.*jbola.*jbola;
function edit10_Callback(hObject, eventdata, volumebola=4/3.*22/7.*jbola.*jbola.*jbola;
handles) set(handles.edit47,'String',luaspermukaanbol
% hObject handle to edit10 (see GCBO) a);
% eventdata reserved - to be defined in a set(handles.edit48,'String',volumebola);
future version of MATLAB
% handles structure with handles and user % Hints: get(hObject,'String') returns
data (see GUIDATA) contents of edit32 as text
Slider1Value=num2str(get(handles.slider1,'Va % str2double(get(hObject,'String'))
lue')); returns contents of edit32 as a double
set(handles.edit9,'String',slider1Value);

sudutslider=str2double(get(handles.edit9,'St % --- Executes during object creation, after


ring')); setting all properties.
kecslider=str2double(get(handles.edit10,'Str function edit32_CreateFcn(hObject,
ing')); eventdata, handles)
sinsudut=sind(sudutslider); % hObject handle to edit32 (see GCBO)
cossudut=cosd(sudutslider); % eventdata reserved - to be defined in a
xmaks=((kecslider.^2)*(2*sinsudut.*cossudut) future version of MATLAB
)/(10); % handles empty - handles not created
ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10); until after all CreateFcns called
txmaks=((2*kecslider.*sinsudut)/10);
tymaks=((kecslider.*sinsudut)/10); % Hint: edit controls usually have a white
background on Windows.
set(handles.edit24,'String',xmaks); % See ISPC and COMPUTER.
set(handles.edit25,'String',ymaks); if ispc &&
set(handles.edit26,'String',txmaks); isequal(get(hObject,'BackgroundColor'),
set(handles.edit27,'String',tymaks); get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
voy=kecslider.*sin(sudutslider*pi/180); end
t=0:txmaks/100:txmaks;
y=voy.*t-0.5*10*t.^2;
x=kecslider*t;
axes(handles.axes2) ;plot(x,y) ; function edit35_Callback(hObject, eventdata,
handles)
% Hints: get(hObject,'String') returns % hObject handle to edit35 (see GCBO)
contents of edit10 as text % eventdata reserved - to be defined in a
% str2double(get(hObject,'String')) future version of MATLAB
returns contents of edit10 as a double % handles structure with handles and user
data (see GUIDATA)
rkerucut=str2double(get(handles.edit35,'Stri
% --- Executes during object creation, after ng'));
setting all properties. skerucut=str2double(get(handles.edit36,'Stri
function edit10_CreateFcn(hObject, ng'));
eventdata, handles) tkerucut=str2double(get(handles.edit37,'Stri
% hObject handle to edit10 (see GCBO) ng'));
% eventdata reserved - to be defined in a luasselimutkerucut=22/7*rkerucut.*skerucut;
future version of MATLAB luaspermukaankerucut=(22/7*rkerucut.*rkerucu
% handles empty - handles not created t)+(luasselimutkerucut);
until after all CreateFcns called volumekerucut=1/3*22/7*rkerucut.*rkerucut.*t
kerucut;
% Hint: edit controls usually have a white r2kerucut=(skerucut.^2)-(tkerucut.^2);
background on Windows. t2kerucut=(skerucut.^2)-(rkerucut.^2);
s2kerucut=(tkerucut.^2)+(rkerucut.^2);
set(handles.edit53,'String',luasselimutkeruc
ut); % --- Executes during object creation, after
set(handles.edit54,'String',luaspermukaanker setting all properties.
ucut); function edit36_CreateFcn(hObject,
set(handles.edit55,'String',volumekerucut); eventdata, handles)
set(handles.edit56,'String',r2kerucut); % hObject handle to edit36 (see GCBO)
set(handles.edit57,'String',t2kerucut); % eventdata reserved - to be defined in a
set(handles.edit58,'String',s2kerucut); future version of MATLAB
% handles empty - handles not created
% Hints: get(hObject,'String') returns until after all CreateFcns called
contents of edit35 as text
% str2double(get(hObject,'String')) % Hint: edit controls usually have a white
returns contents of edit35 as a double background on Windows.
% See ISPC and COMPUTER.
if ispc &&
% --- Executes during object creation, after isequal(get(hObject,'BackgroundColor'),
setting all properties. get(0,'defaultUicontrolBackgroundColor'))
function edit35_CreateFcn(hObject, set(hObject,'BackgroundColor','white');
eventdata, handles) end
% hObject handle to edit35 (see GCBO)
% eventdata reserved - to be defined in a
future version of MATLAB
% handles empty - handles not created function edit37_Callback(hObject, eventdata,
until after all CreateFcns called handles)
% hObject handle to edit37 (see GCBO)
% Hint: edit controls usually have a white % eventdata reserved - to be defined in a
background on Windows. future version of MATLAB
% See ISPC and COMPUTER. % handles structure with handles and user
if ispc && data (see GUIDATA)
isequal(get(hObject,'BackgroundColor'), rkerucut=str2double(get(handles.edit35,'Stri
get(0,'defaultUicontrolBackgroundColor')) ng'));
set(hObject,'BackgroundColor','white'); skerucut=str2double(get(handles.edit36,'Stri
end ng'));
tkerucut=str2double(get(handles.edit37,'Stri
ng'));
luasselimutkerucut=22/7*rkerucut.*skerucut;
function edit36_Callback(hObject, eventdata, luaspermukaankerucut=(22/7*rkerucut.*rkerucu
handles) t)+(luasselimutkerucut);
% hObject handle to edit36 (see GCBO) volumekerucut=1/3*22/7*rkerucut.*rkerucut.*t
% eventdata reserved - to be defined in a kerucut;
future version of MATLAB r2kerucut=(skerucut.^2)-(tkerucut.^2);
% handles structure with handles and user t2kerucut=(skerucut.^2)-(rkerucut.^2);
data (see GUIDATA) s2kerucut=(tkerucut.^2)+(rkerucut.^2);
rkerucut=str2double(get(handles.edit35,'Stri set(handles.edit53,'String',luasselimutkeruc
ng')); ut);
skerucut=str2double(get(handles.edit36,'Stri set(handles.edit54,'String',luaspermukaanker
ng')); ucut);
tkerucut=str2double(get(handles.edit37,'Stri set(handles.edit55,'String',volumekerucut);
ng')); set(handles.edit56,'String',r2kerucut);
luasselimutkerucut=22/7*rkerucut.*skerucut; set(handles.edit57,'String',t2kerucut);
luaspermukaankerucut=(22/7*rkerucut.*rkerucu set(handles.edit58,'String',s2kerucut);
t)+(luasselimutkerucut);
volumekerucut=1/3*22/7*rkerucut.*rkerucut.*t % Hints: get(hObject,'String') returns
kerucut; contents of edit37 as text
r2kerucut=(skerucut.^2)-(tkerucut.^2); % str2double(get(hObject,'String'))
t2kerucut=(skerucut.^2)-(rkerucut.^2); returns contents of edit37 as a double
s2kerucut=(tkerucut.^2)+(rkerucut.^2);
set(handles.edit53,'String',luasselimutkeruc
ut); % --- Executes during object creation, after
set(handles.edit54,'String',luaspermukaanker setting all properties.
ucut); function edit37_CreateFcn(hObject,
set(handles.edit55,'String',volumekerucut); eventdata, handles)
set(handles.edit56,'String',r2kerucut); % hObject handle to edit37 (see GCBO)
set(handles.edit57,'String',t2kerucut); % eventdata reserved - to be defined in a
set(handles.edit58,'String',s2kerucut); future version of MATLAB
% handles empty - handles not created
% Hints: get(hObject,'String') returns until after all CreateFcns called
contents of edit36 as text
% str2double(get(hObject,'String')) % Hint: edit controls usually have a white
returns contents of edit36 as a double background on Windows.
% See ISPC and COMPUTER. rtabung=str2double(get(handles.edit34,'Strin
if ispc && g'));
isequal(get(hObject,'BackgroundColor'), luaspermukaantabung=2.*22/7.*rtabung.*(ttabu
get(0,'defaultUicontrolBackgroundColor')) ng+rtabung);
set(hObject,'BackgroundColor','white'); luasselimuttabung=2.*22/7.*rtabung.*ttabung;
end luaspermukaantanpatabung=(22/7*rtabung.*rtab
ung)+(luasselimuttabung);
volumetabung=22/7*rtabung.*rtabung.*ttabung;
set(handles.edit49,'String',luaspermukaantab
function edit33_Callback(hObject, eventdata, ung);
handles) set(handles.edit50,'String',luasselimuttabun
% hObject handle to edit33 (see GCBO) g);
% eventdata reserved - to be defined in a set(handles.edit51,'String',luaspermukaantan
future version of MATLAB patabung);
% handles structure with handles and user set(handles.edit52,'String',volumetabung);
data (see GUIDATA)
ttabung=str2double(get(handles.edit33,'Strin % Hints: get(hObject,'String') returns
g')); contents of edit34 as text
rtabung=str2double(get(handles.edit34,'Strin % str2double(get(hObject,'String'))
g')); returns contents of edit34 as a double
luaspermukaantabung=2.*22/7.*rtabung.*(ttabu
ng+rtabung);
luasselimuttabung=2.*22/7.*rtabung.*ttabung; % --- Executes during object creation, after
luaspermukaantanpatabung=(22/7*rtabung.*rtab setting all properties.
ung)+(luasselimuttabung); function edit34_CreateFcn(hObject,
volumetabung=22/7*rtabung.*rtabung.*ttabung; eventdata, handles)
set(handles.edit49,'String',luaspermukaantab % hObject handle to edit34 (see GCBO)
ung); % eventdata reserved - to be defined in a
set(handles.edit50,'String',luasselimuttabun future version of MATLAB
g); % handles empty - handles not created
set(handles.edit51,'String',luaspermukaantan until after all CreateFcns called
patabung);
set(handles.edit52,'String',volumetabung); % Hint: edit controls usually have a white
background on Windows.
% Hints: get(hObject,'String') returns % See ISPC and COMPUTER.
contents of edit33 as text if ispc &&
% str2double(get(hObject,'String')) isequal(get(hObject,'BackgroundColor'),
returns contents of edit33 as a double get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes during object creation, after
setting all properties.
function edit33_CreateFcn(hObject,
eventdata, handles) function edit31_Callback(hObject, eventdata,
% hObject handle to edit33 (see GCBO) handles)
% eventdata reserved - to be defined in a % hObject handle to edit31 (see GCBO)
future version of MATLAB % eventdata reserved - to be defined in a
% handles empty - handles not created future version of MATLAB
until after all CreateFcns called % handles structure with handles and user
data (see GUIDATA)
% Hint: edit controls usually have a white rkubus=str2double(get(handles.edit31,'String
background on Windows. '));
% See ISPC and COMPUTER. luaspermukaankubus=6*(rkubus.*rkubus);
if ispc && panjangrusukkubus=12.*rkubus;
isequal(get(hObject,'BackgroundColor'), diagonalbidangkubus=rkubus*(sqrt(2));
get(0,'defaultUicontrolBackgroundColor')) diagonalruangkubus=rkubus*(sqrt(3));
set(hObject,'BackgroundColor','white'); volumekubus=rkubus.^3;
end set(handles.edit42,'String',luaspermukaankub
us);
set(handles.edit43,'String',panjangrusukkubu
s);
function edit34_Callback(hObject, eventdata, set(handles.edit44,'String',diagonalbidangku
handles) bus);
% hObject handle to edit34 (see GCBO) set(handles.edit45,'String',diagonalruangkub
% eventdata reserved - to be defined in a us);
future version of MATLAB set(handles.edit46,'String',volumekubus);
% handles structure with handles and user
data (see GUIDATA) % Hints: get(hObject,'String') returns
ttabung=str2double(get(handles.edit33,'Strin contents of edit31 as text
g')); % str2double(get(hObject,'String'))
returns contents of edit31 as a double
if ispc &&
isequal(get(hObject,'BackgroundColor'),
% --- Executes during object creation, after get(0,'defaultUicontrolBackgroundColor'))
setting all properties. set(hObject,'BackgroundColor','white');
function edit31_CreateFcn(hObject, end
eventdata, handles)
% hObject handle to edit31 (see GCBO)
% eventdata reserved - to be defined in a
future version of MATLAB function edit29_Callback(hObject, eventdata,
% handles empty - handles not created handles)
until after all CreateFcns called % hObject handle to edit29 (see GCBO)
% eventdata reserved - to be defined in a
% Hint: edit controls usually have a white future version of MATLAB
background on Windows. % handles structure with handles and user
% See ISPC and COMPUTER. data (see GUIDATA)
if ispc && pbalok=str2double(get(handles.edit28,'String
isequal(get(hObject,'BackgroundColor'), '));
get(0,'defaultUicontrolBackgroundColor')) lbalok=str2double(get(handles.edit29,'String
set(hObject,'BackgroundColor','white'); '));
end tbalok=str2double(get(handles.edit30,'String
'));
luaspermukaanbalok=2*((pbalok.*lbalok)+(pbal
ok.*tbalok)+(lbalok.*tbalok));
function edit28_Callback(hObject, eventdata, panjangrusukblok=4*(pbalok+lbalok+tbalok);
handles) diagonalruangbalok=sqrt((pbalok.^2)+(lbalok.
% hObject handle to edit28 (see GCBO) ^2)+(tbalok.^2));
% eventdata reserved - to be defined in a volumebalok=pbalok.*lbalok.*tbalok;
future version of MATLAB set(handles.edit38,'String',luaspermukaanbal
% handles structure with handles and user ok);
data (see GUIDATA) set(handles.edit39,'String',panjangrusukblok
pbalok=str2double(get(handles.edit28,'String );
')); set(handles.edit40,'String',diagonalruangbal
lbalok=str2double(get(handles.edit29,'String ok);
')); set(handles.edit41,'String',volumebalok);
tbalok=str2double(get(handles.edit30,'String
')); % Hints: get(hObject,'String') returns
luaspermukaanbalok=2*((pbalok.*lbalok)+(pbal contents of edit29 as text
ok.*tbalok)+(lbalok.*tbalok)); % str2double(get(hObject,'String'))
panjangrusukblok=4*(pbalok+lbalok+tbalok); returns contents of edit29 as a double
diagonalruangbalok=sqrt((pbalok.^2)+(lbalok.
^2)+(tbalok.^2));
volumebalok=pbalok.*lbalok.*tbalok; % --- Executes during object creation, after
set(handles.edit38,'String',luaspermukaanbal setting all properties.
ok); function edit29_CreateFcn(hObject,
set(handles.edit39,'String',panjangrusukblok eventdata, handles)
); % hObject handle to edit29 (see GCBO)
set(handles.edit40,'String',diagonalruangbal % eventdata reserved - to be defined in a
ok); future version of MATLAB
set(handles.edit41,'String',volumebalok); % handles empty - handles not created
until after all CreateFcns called
% Hints: get(hObject,'String') returns
contents of edit28 as text % Hint: edit controls usually have a white
% str2double(get(hObject,'String')) background on Windows.
returns contents of edit28 as a double % See ISPC and COMPUTER.
if ispc &&
isequal(get(hObject,'BackgroundColor'),
% --- Executes during object creation, after get(0,'defaultUicontrolBackgroundColor'))
setting all properties. set(hObject,'BackgroundColor','white');
function edit28_CreateFcn(hObject, end
eventdata, handles)
% hObject handle to edit28 (see GCBO)
% eventdata reserved - to be defined in a
future version of MATLAB function edit30_Callback(hObject, eventdata,
% handles empty - handles not created handles)
until after all CreateFcns called % hObject handle to edit30 (see GCBO)
% eventdata reserved - to be defined in a
% Hint: edit controls usually have a white future version of MATLAB
background on Windows. % handles structure with handles and user
% See ISPC and COMPUTER. data (see GUIDATA)
pbalok=str2double(get(handles.edit28,'String
'));
lbalok=str2double(get(handles.edit29,'String % See ISPC and COMPUTER.
')); if ispc &&
tbalok=str2double(get(handles.edit30,'String isequal(get(hObject,'BackgroundColor'),
')); get(0,'defaultUicontrolBackgroundColor'))
luaspermukaanbalok=2*((pbalok.*lbalok)+(pbal set(hObject,'BackgroundColor','white');
ok.*tbalok)+(lbalok.*tbalok)); end
panjangrusukblok=4*(pbalok+lbalok+tbalok);
diagonalruangbalok=sqrt((pbalok.^2)+(lbalok.
^2)+(tbalok.^2));
volumebalok=pbalok.*lbalok.*tbalok; function edit54_Callback(hObject, eventdata,
set(handles.edit38,'String',luaspermukaanbal handles)
ok); % hObject handle to edit54 (see GCBO)
set(handles.edit39,'String',panjangrusukblok % eventdata reserved - to be defined in a
); future version of MATLAB
set(handles.edit40,'String',diagonalruangbal % handles structure with handles and user
ok); data (see GUIDATA)
set(handles.edit41,'String',volumebalok);
% Hints: get(hObject,'String') returns
% Hints: get(hObject,'String') returns contents of edit54 as text
contents of edit30 as text % str2double(get(hObject,'String'))
% str2double(get(hObject,'String')) returns contents of edit54 as a double
returns contents of edit30 as a double

% --- Executes during object creation, after


% --- Executes during object creation, after setting all properties.
setting all properties. function edit54_CreateFcn(hObject,
function edit30_CreateFcn(hObject, eventdata, handles)
eventdata, handles) % hObject handle to edit54 (see GCBO)
% hObject handle to edit30 (see GCBO) % eventdata reserved - to be defined in a
% eventdata reserved - to be defined in a future version of MATLAB
future version of MATLAB % handles empty - handles not created
% handles empty - handles not created until after all CreateFcns called
until after all CreateFcns called
% Hint: edit controls usually have a white
% Hint: edit controls usually have a white background on Windows.
background on Windows. % See ISPC and COMPUTER.
% See ISPC and COMPUTER. if ispc &&
if ispc && isequal(get(hObject,'BackgroundColor'),
isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');
set(hObject,'BackgroundColor','white'); end
end

function edit55_Callback(hObject, eventdata,


function edit53_Callback(hObject, eventdata, handles)
handles) % hObject handle to edit55 (see GCBO)
% hObject handle to edit53 (see GCBO) % eventdata reserved - to be defined in a
% eventdata reserved - to be defined in a future version of MATLAB
future version of MATLAB % handles structure with handles and user
% handles structure with handles and user data (see GUIDATA)
data (see GUIDATA)
% Hints: get(hObject,'String') returns
% Hints: get(hObject,'String') returns contents of edit55 as text
contents of edit53 as text % str2double(get(hObject,'String'))
% str2double(get(hObject,'String')) returns contents of edit55 as a double
returns contents of edit53 as a double

% --- Executes during object creation, after


% --- Executes during object creation, after setting all properties.
setting all properties. function edit55_CreateFcn(hObject,
function edit53_CreateFcn(hObject, eventdata, handles)
eventdata, handles) % hObject handle to edit55 (see GCBO)
% hObject handle to edit53 (see GCBO) % eventdata reserved - to be defined in a
% eventdata reserved - to be defined in a future version of MATLAB
future version of MATLAB % handles empty - handles not created
% handles empty - handles not created until after all CreateFcns called
until after all CreateFcns called
% Hint: edit controls usually have a white
% Hint: edit controls usually have a white background on Windows.
background on Windows. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

function edit47_Callback(hObject, eventdata, function edit49_Callback(hObject, eventdata,


handles) handles)
% hObject handle to edit47 (see GCBO) % hObject handle to edit49 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)

% Hints: get(hObject,'String') returns % Hints: get(hObject,'String') returns


contents of edit47 as text contents of edit49 as text
% str2double(get(hObject,'String')) % str2double(get(hObject,'String'))
returns contents of edit47 as a double returns contents of edit49 as a double

% --- Executes during object creation, after % --- Executes during object creation, after
setting all properties. setting all properties.
function edit47_CreateFcn(hObject, function edit49_CreateFcn(hObject,
eventdata, handles) eventdata, handles)
% hObject handle to edit47 (see GCBO) % hObject handle to edit49 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles empty - handles not created
until after all CreateFcns called until after all CreateFcns called

% Hint: edit controls usually have a white % Hint: edit controls usually have a white
background on Windows. background on Windows.
% See ISPC and COMPUTER. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

function edit48_Callback(hObject, eventdata, function edit50_Callback(hObject, eventdata,


handles) handles)
% hObject handle to edit48 (see GCBO) % hObject handle to edit50 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)

% Hints: get(hObject,'String') returns % Hints: get(hObject,'String') returns


contents of edit48 as text contents of edit50 as text
% str2double(get(hObject,'String')) % str2double(get(hObject,'String'))
returns contents of edit48 as a double returns contents of edit50 as a double

% --- Executes during object creation, after % --- Executes during object creation, after
setting all properties. setting all properties.
function edit48_CreateFcn(hObject, function edit50_CreateFcn(hObject,
eventdata, handles) eventdata, handles)
% hObject handle to edit48 (see GCBO) % hObject handle to edit50 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles empty - handles not created
until after all CreateFcns called until after all CreateFcns called

% Hint: edit controls usually have a white % Hint: edit controls usually have a white
background on Windows. background on Windows.
% See ISPC and COMPUTER. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

function edit51_Callback(hObject, eventdata, function edit42_Callback(hObject, eventdata,


handles) handles)
% hObject handle to edit51 (see GCBO) % hObject handle to edit42 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)

% Hints: get(hObject,'String') returns % Hints: get(hObject,'String') returns


contents of edit51 as text contents of edit42 as text
% str2double(get(hObject,'String')) % str2double(get(hObject,'String'))
returns contents of edit51 as a double returns contents of edit42 as a double

% --- Executes during object creation, after % --- Executes during object creation, after
setting all properties. setting all properties.
function edit51_CreateFcn(hObject, function edit42_CreateFcn(hObject,
eventdata, handles) eventdata, handles)
% hObject handle to edit51 (see GCBO) % hObject handle to edit42 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles empty - handles not created
until after all CreateFcns called until after all CreateFcns called

% Hint: edit controls usually have a white % Hint: edit controls usually have a white
background on Windows. background on Windows.
% See ISPC and COMPUTER. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

function edit52_Callback(hObject, eventdata, function edit43_Callback(hObject, eventdata,


handles) handles)
% hObject handle to edit52 (see GCBO) % hObject handle to edit43 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)

% Hints: get(hObject,'String') returns % Hints: get(hObject,'String') returns


contents of edit52 as text contents of edit43 as text
% str2double(get(hObject,'String')) % str2double(get(hObject,'String'))
returns contents of edit52 as a double returns contents of edit43 as a double

% --- Executes during object creation, after % --- Executes during object creation, after
setting all properties. setting all properties.
function edit52_CreateFcn(hObject, function edit43_CreateFcn(hObject,
eventdata, handles) eventdata, handles)
% hObject handle to edit52 (see GCBO) % hObject handle to edit43 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles empty - handles not created
until after all CreateFcns called until after all CreateFcns called

% Hint: edit controls usually have a white % Hint: edit controls usually have a white
background on Windows. background on Windows.
% See ISPC and COMPUTER. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

function edit44_Callback(hObject, eventdata, function edit46_Callback(hObject, eventdata,


handles) handles)
% hObject handle to edit44 (see GCBO) % hObject handle to edit46 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)

% Hints: get(hObject,'String') returns % Hints: get(hObject,'String') returns


contents of edit44 as text contents of edit46 as text
% str2double(get(hObject,'String')) % str2double(get(hObject,'String'))
returns contents of edit44 as a double returns contents of edit46 as a double

% --- Executes during object creation, after % --- Executes during object creation, after
setting all properties. setting all properties.
function edit44_CreateFcn(hObject, function edit46_CreateFcn(hObject,
eventdata, handles) eventdata, handles)
% hObject handle to edit44 (see GCBO) % hObject handle to edit46 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles empty - handles not created
until after all CreateFcns called until after all CreateFcns called

% Hint: edit controls usually have a white % Hint: edit controls usually have a white
background on Windows. background on Windows.
% See ISPC and COMPUTER. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

function edit45_Callback(hObject, eventdata, function edit38_Callback(hObject, eventdata,


handles) handles)
% hObject handle to edit45 (see GCBO) % hObject handle to edit38 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)

% Hints: get(hObject,'String') returns % Hints: get(hObject,'String') returns


contents of edit45 as text contents of edit38 as text
% str2double(get(hObject,'String')) % str2double(get(hObject,'String'))
returns contents of edit45 as a double returns contents of edit38 as a double

% --- Executes during object creation, after % --- Executes during object creation, after
setting all properties. setting all properties.
function edit45_CreateFcn(hObject, function edit38_CreateFcn(hObject,
eventdata, handles) eventdata, handles)
% hObject handle to edit45 (see GCBO) % hObject handle to edit38 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles empty - handles not created
until after all CreateFcns called until after all CreateFcns called

% Hint: edit controls usually have a white % Hint: edit controls usually have a white
background on Windows. background on Windows.
% See ISPC and COMPUTER. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

function edit39_Callback(hObject, eventdata, function edit41_Callback(hObject, eventdata,


handles) handles)
% hObject handle to edit39 (see GCBO) % hObject handle to edit41 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)

% Hints: get(hObject,'String') returns % Hints: get(hObject,'String') returns


contents of edit39 as text contents of edit41 as text
% str2double(get(hObject,'String')) % str2double(get(hObject,'String'))
returns contents of edit39 as a double returns contents of edit41 as a double

% --- Executes during object creation, after % --- Executes during object creation, after
setting all properties. setting all properties.
function edit39_CreateFcn(hObject, function edit41_CreateFcn(hObject,
eventdata, handles) eventdata, handles)
% hObject handle to edit39 (see GCBO) % hObject handle to edit41 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles empty - handles not created
until after all CreateFcns called until after all CreateFcns called

% Hint: edit controls usually have a white % Hint: edit controls usually have a white
background on Windows. background on Windows.
% See ISPC and COMPUTER. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

function edit40_Callback(hObject, eventdata, function edit3_Callback(hObject, eventdata,


handles) handles)
% hObject handle to edit40 (see GCBO) % hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)
ivektoru=str2double(get(handles.edit1,'Strin
% Hints: get(hObject,'String') returns g'));
contents of edit40 as text jvektoru=str2double(get(handles.edit2,'Strin
% str2double(get(hObject,'String')) g'));
returns contents of edit40 as a double ivektorv=str2double(get(handles.edit3,'Strin
g'));
jvektorv=str2double(get(handles.edit4,'Strin
% --- Executes during object creation, after g'));
setting all properties.
function edit40_CreateFcn(hObject, ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt
eventdata, handles) orv);
% hObject handle to edit40 (see GCBO) panjangu=sqrt((ivektoru.^2)+(jvektoru.^2));
% eventdata reserved - to be defined in a panjangv=sqrt((ivektorv.^2)+(jvektorv.^2));
future version of MATLAB sudutuv=acosd((ukaliv)/(panjangu.*panjangv))
% handles empty - handles not created ;
until after all CreateFcns called resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2
*panjangu.*panjangv).*cosd(sudutuv));
% Hint: edit controls usually have a white % Hints: get(hObject,'String') returns
background on Windows. contents of edit3 as text
% See ISPC and COMPUTER. % str2double(get(hObject,'String'))
returns contents of edit3 as a double
% --- Executes during object creation, after
setting all properties. function edit1_Callback(hObject, eventdata,
function edit3_CreateFcn(hObject, eventdata, handles)
handles) % hObject handle to edit1 (see GCBO)
% hObject handle to edit3 (see GCBO) % eventdata reserved - to be defined in a
% eventdata reserved - to be defined in a future version of MATLAB
future version of MATLAB % handles structure with handles and user
% handles empty - handles not created data (see GUIDATA)
until after all CreateFcns called ivektoru=str2double(get(handles.edit1,'Strin
g'));
% Hint: edit controls usually have a white jvektoru=str2double(get(handles.edit2,'Strin
background on Windows. g'));
% See ISPC and COMPUTER. ivektorv=str2double(get(handles.edit3,'Strin
if ispc && g'));
isequal(get(hObject,'BackgroundColor'), jvektorv=str2double(get(handles.edit4,'Strin
get(0,'defaultUicontrolBackgroundColor')) g'));
set(hObject,'BackgroundColor','white');
end ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt
orv);
panjangu=sqrt((ivektoru.^2)+(jvektoru.^2));
panjangv=sqrt((ivektorv.^2)+(jvektorv.^2));
function edit4_Callback(hObject, eventdata, sudutuv=acosd((ukaliv)/(panjangu.*panjangv))
handles) ;
% hObject handle to edit4 (see GCBO) resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2
% eventdata reserved - to be defined in a *panjangu.*panjangv).*cosd(sudutuv));
future version of MATLAB
% handles structure with handles and user % Hints: get(hObject,'String') returns
data (see GUIDATA) contents of edit1 as text
ivektoru=str2double(get(handles.edit1,'Strin % str2double(get(hObject,'String'))
g')); returns contents of edit1 as a double
jvektoru=str2double(get(handles.edit2,'Strin
g'));
ivektorv=str2double(get(handles.edit3,'Strin % --- Executes during object creation, after
g')); setting all properties.
jvektorv=str2double(get(handles.edit4,'Strin function edit1_CreateFcn(hObject, eventdata,
g')); handles)
% hObject handle to edit1 (see GCBO)
ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt % eventdata reserved - to be defined in a
orv); future version of MATLAB
panjangu=sqrt((ivektoru.^2)+(jvektoru.^2)); % handles empty - handles not created
panjangv=sqrt((ivektorv.^2)+(jvektorv.^2)); until after all CreateFcns called
sudutuv=acosd((ukaliv)/(panjangu.*panjangv))
; % Hint: edit controls usually have a white
resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2 background on Windows.
*panjangu.*panjangv).*cosd(sudutuv)); % See ISPC and COMPUTER.
% Hints: get(hObject,'String') returns if ispc &&
contents of edit4 as text isequal(get(hObject,'BackgroundColor'),
% str2double(get(hObject,'String')) get(0,'defaultUicontrolBackgroundColor'))
returns contents of edit4 as a double set(hObject,'BackgroundColor','white');
end

% --- Executes during object creation, after


setting all properties.
function edit4_CreateFcn(hObject, eventdata, function edit2_Callback(hObject, eventdata,
handles) handles)
% hObject handle to edit4 (see GCBO) % hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles structure with handles and user
until after all CreateFcns called data (see GUIDATA)
ivektoru=str2double(get(handles.edit1,'Strin
% Hint: edit controls usually have a white g'));
background on Windows. jvektoru=str2double(get(handles.edit2,'Strin
% See ISPC and COMPUTER. g'));
if ispc && ivektorv=str2double(get(handles.edit3,'Strin
isequal(get(hObject,'BackgroundColor'), g'));
get(0,'defaultUicontrolBackgroundColor')) jvektorv=str2double(get(handles.edit4,'Strin
set(hObject,'BackgroundColor','white'); g'));
end
ukaliv=(ivektoru.*ivektorv)+(jvektoru.*jvekt function edit57_Callback(hObject, eventdata,
orv); handles)
panjangu=sqrt((ivektoru.^2)+(jvektoru.^2)); % hObject handle to edit57 (see GCBO)
panjangv=sqrt((ivektorv.^2)+(jvektorv.^2)); % eventdata reserved - to be defined in a
sudutuv=acosd((ukaliv)/(panjangu.*panjangv)) future version of MATLAB
; % handles structure with handles and user
resultanuv=sqrt((panjangu^2)+(panjangv^2)+(2 data (see GUIDATA)
*panjangu.*panjangv).*cosd(sudutuv));
% Hints: get(hObject,'String') returns % Hints: get(hObject,'String') returns
contents of edit2 as text contents of edit57 as text
% str2double(get(hObject,'String')) % str2double(get(hObject,'String'))
returns contents of edit2 as a double returns contents of edit57 as a double

% --- Executes during object creation, after % --- Executes during object creation, after
setting all properties. setting all properties.
function edit2_CreateFcn(hObject, eventdata, function edit57_CreateFcn(hObject,
handles) eventdata, handles)
% hObject handle to edit2 (see GCBO) % hObject handle to edit57 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles empty - handles not created
until after all CreateFcns called until after all CreateFcns called

% Hint: edit controls usually have a white % Hint: edit controls usually have a white
background on Windows. background on Windows.
% See ISPC and COMPUTER. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

function edit56_Callback(hObject, eventdata, function edit58_Callback(hObject, eventdata,


handles) handles)
% hObject handle to edit56 (see GCBO) % hObject handle to edit58 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles structure with handles and user % handles structure with handles and user
data (see GUIDATA) data (see GUIDATA)

% Hints: get(hObject,'String') returns % Hints: get(hObject,'String') returns


contents of edit56 as text contents of edit58 as text
% str2double(get(hObject,'String')) % str2double(get(hObject,'String'))
returns contents of edit56 as a double returns contents of edit58 as a double

% --- Executes during object creation, after % --- Executes during object creation, after
setting all properties. setting all properties.
function edit56_CreateFcn(hObject, function edit58_CreateFcn(hObject,
eventdata, handles) eventdata, handles)
% hObject handle to edit56 (see GCBO) % hObject handle to edit58 (see GCBO)
% eventdata reserved - to be defined in a % eventdata reserved - to be defined in a
future version of MATLAB future version of MATLAB
% handles empty - handles not created % handles empty - handles not created
until after all CreateFcns called until after all CreateFcns called

% Hint: edit controls usually have a white % Hint: edit controls usually have a white
background on Windows. background on Windows.
% See ISPC and COMPUTER. % See ISPC and COMPUTER.
if ispc && if ispc &&
isequal(get(hObject,'BackgroundColor'), isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor')) get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white'); set(hObject,'BackgroundColor','white');
end end

You might also like