Tugasppt6 Ade.m
Tugasppt6 Ade.m
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 = TugasPPT6_ikky_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a2 future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
a = get(handles.a3, 'Value');
b = get(handles.b3, 'Value');
if a == 1
set(handles.edit13, 'String', sprintf('hta = %d m', hta));
set(handles.rumus3, 'String', 'hta = (Voa^2 - Uta^2) / (2 * ga)');
elseif b == 1
set(handles.edit13, 'String', sprintf('ta = %d s', ta));
set(handles.rumus3, 'String', 'ta = (Voa - Uta) / ga');
end
a = get(handles.a2, 'Value');
b = get(handles.b2, 'Value');
if a == 1
set(handles.edit12, 'String', sprintf('htb = %d m', htb));
set(handles.rumus2, 'String', 'htb = 1/2 * g * t^2');
elseif b == 1
set(handles.edit12, 'String', sprintf('Vtb = %d m/s', Vtb));
set(handles.rumus2, 'String', 'Vtb = g * tb');
end
a = get(handles.a, 'Value');
b = get(handles.b, 'Value');
if a == 1
set(handles.edit11, 'String', sprintf('ht = %d m', ht));
set(handles.rumus1, 'String', 'ht = Vo*t + 1/2*g*t^2');
elseif b == 1
Ut = Vo + (g * t);
set(handles.edit11, 'String', sprintf('Ut = %d m/s', Ut));
set(handles.rumus1, 'String', 'Ut = Vo + g*t');
end