Академический Документы
Профессиональный Документы
Культура Документы
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = HendriWahyono_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)
axes(handles.axes6);
logounri=imread('logounri.jpg');
image(logounri);
axis off;
axis image;
kecslider=str2double(get(handles.edit14,'string'));
sudutslider=str2double(get(handles.edit15,'string'));
sinsudut=sind(sudutslider);
cossudut=cosd(sudutslider);
xmaks=((kecslider.^2)*(2*sinsudut.*cossudut))/(10);
ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10);
txmaks=((2*kecslider.*sinsudut)/10);
tymaks=((kecslider.*sinsudut)/10);
voy=kecslider.*sinsudut;
t=0:txmaks/100:txmaks;
y=(voy.*t)-(0.5*10*(t.^2));
x=kecslider*t;
axes(handles.axes1);
plot(x,y,'b-s');
set(gca,'Color','c');
xlabel('Waktu(s)');ylabel('Tinggi(h)');
title('Gerak Parabola','FontSize',10);
legend('Gerak Parabola');
set(handles.edit16,'string',xmaks);
set(handles.edit17,'string',ymaks);
set(handles.edit18,'string',txmaks);
set(handles.edit19,'string',tymaks);
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of
slider
kecslider=str2double(get(handles.edit14,'string'));
sudutslider=str2double(get(handles.edit15,'string'));
sinsudut=sind(sudutslider);
cossudut=cosd(sudutslider);
xmaks=((kecslider.^2)*(2*sinsudut.*cossudut))/(10);
ymaks=((kecslider.^2)*(sinsudut.^2))/(2*10);
txmaks=((2*kecslider.*sinsudut)/10);
tymaks=((kecslider.*sinsudut)/10);
voy=kecslider.*sinsudut;
t=0:txmaks/100:txmaks;
y=(voy.*t)-(0.5*10*(t.^2));
x=kecslider*t;
axes(handles.axes1);
plot(x,y,'r-s');
set(gca,'Color','y');
xlabel('Waktu(s)');ylabel('Tinggi(h)');
title('Gerak Parabola','FontSize',10);
legend('Gerak Parabola');
set(handles.edit16,'string',xmaks);
set(handles.edit17,'string',ymaks);
set(handles.edit18,'string',txmaks);
set(handles.edit19,'string',tymaks);
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of
slider
% --------------------------------------------------------------------
function File_Callback(hObject, eventdata, handles)
% hObject handle to File (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Edit_Callback(hObject, eventdata, handles)
% hObject handle to Edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function View_Callback(hObject, eventdata, handles)
% hObject handle to View (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Help_Callback(hObject, eventdata, handles)
% hObject handle to Help (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Kontak_Callback(hObject, eventdata, handles)
% hObject handle to Kontak (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Exit_Callback(hObject, eventdata, handles)
% hObject handle to Exit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_9_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Coding_Callback(hObject, eventdata, handles)
% hObject handle to Coding (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function New_Callback(hObject, eventdata, handles)
% hObject handle to New (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Open_Callback(hObject, eventdata, handles)
% hObject handle to Open (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Save_Callback(hObject, eventdata, handles)
% hObject handle to Save (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Print_Callback(hObject, eventdata, handles)
% hObject handle to Print (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Close_Callback(hObject, eventdata, handles)
% hObject handle to Close (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function GLB_Callback(hObject, eventdata, handles)
% hObject handle to GLB (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_12_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_12 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)