You are on page 1of 2

Kerucut kebawah

%bangun kerucut
cylinder([0 1])
h=findobj('type','surface');
set(h,'Cdata',rand(size(get(h,'Cdata'))))
title('kerucut')

grafik orde 1x2

%graphic 1.s=((vo*t)+(0.5*a*(t.^2)))')
%graphic 2.ek=0.5*m*(v^2)
%input data
vo=input('vo=');
a=input('a=');
m=input('m=');
v=input('v=');
t=0:0.1:10;
d=((vo*t)+(0.5*a*(t.^2)));
ek=0.5*m*(v^2);
subplot(1,2,1);plot(t,d,'b');
xlabel('d');ylabel('t');
title('Grafik d=((vo*t)+(0.5*a*(t.^2)))');
grid on;
subplot(1,2,2);plot(ek,v,'g');
xlabel('v');ylabel('Ek');
title('Grafik ek=0.5*m*(v^2)');
grid on;

menentukan nilai c

%menentukan nilai p
%input data
clc;
disp('menentukan nilai c');
p=input('koef p=');
q=input('koef q=');
r=input('koef r=');
%proces
c=(p*q)+r;
%output
fprintf('\n nilai c=%3.2f\n',c);

disp('aljabar linier dan matriks');


P=input('input elemen matriks P=');
Q=input('input elemen matriks Q=');
R=input('input elemen matriks R=');
%proses
C=P*Q*R
%output
disp('elemen matriks P');
P
disp('elemen matriks Q');
Q
disp('elemen matriks R');
R
disp('elemen matriks C');
C