You are on page 1of 14

1.

Cara kerja menggunakan example 1


a) Persamaan z = 9 x2 y2
x=-9:.6:3;
y=-1:.2:1;
[xx,yy]=meshgrid(x,y);
zz=9-xx.^2-yy.^2;
surf(xx,yy,zz);
grid on;
xlabel('sumbu-x')
ylabel('sumbu-y')
zlabel('sumbu-z')
title('Grafik persamaan zz=9-xx.^2-yy.^2 dalam plot 3 dimensi')

b) Persamaan z =
x=-3:.6:3;
y=-1:.2:1;
[xx,yy]=meshgrid(x,y);
zz=sqrt(xx.^2+yy.^2);
surf(xx,yy,zz);
grid on;
xlabel('sumbu-x')
ylabel('sumbu-y')
zlabel('sumbu-z')
title('Grafik persamaan zz=sqrt(xx.^2+yy.^2) dalam plot 3 dimensi')

2. Cara kerja menggunakan example 2 dan example 3

a) Persamaan

Mencari nilai absolut

1 - x2 - y2
Z2+(r cos )2+(r sin )2=1
Z2+r2cos2 +r2sin2 =1
Z2-1=-r2 cos2 -r2sin2 :X-1
-Z2+1=r2 cos2 +r2sin2
-Z2+1=r2 (cos2 +sin2 )
r2=
r=

Nilai absolute z2 + 1
Z2

|z| 1

THETA=0:pi/12:2*pi;
Z=-1:.3:8;
[z,theta]=meshgrid(Z,THETA);
r=sqrt((-z.^2+1)./(cos(theta).^2+sin(theta).^2));
x=r.*cos(theta);
y=r.*sin(theta);
surf(x,y,z)
title('Grafik Persamaan z=sqrt (1-x.^2-y.^2)dalam plot 3 dimensi')
xlabel('sumbu-x')
ylabel('Sumbu-y')
zlabel('Sumbu-z')

z=[-7:.2:9:.2:.3:-1];
theta=linspace(0,2*pi,36);
[z,theta]=meshgrid(z,theta);
r= sqrt((-z.^2+1)./(cos(theta).^2+sin(theta).^2));
x=r.*cos(theta);
y=r.*sin(theta);
surf(x,y,z)
axis auto
title('Grafik Persamaan z=sqrt (1-x.^2-y.^2) dalam plot 3 dimensi')
xlabel('sumbu-x')
ylabel('sumbu-y')
zlabel('sumbu-z')

b) Persamaan

=4

Mencari nilai absolute


-

=4
- (r cos

- (r sin

=4

Z2-r2 cos2 -r2sin2 = 4


Z2 - 4 = r2 cos2 +r2sin2
Z2 - 4 = r2 ( cos2 + sin2 )
r2=
r=

Nilai absolute z2 - 4
Z2

|z| 2

THETA=0:pi/12:2*pi;
Z=-9:.5:9;
[z,theta]=meshgrid(Z,THETA);
r=sqrt((z.^2-4)./(cos(theta).^2+sin(theta).^2));
x=r.*cos(theta);
y=r.*sin(theta);
surf(x,y,z)
view([60,10])
grid on
box on
axis auto
xlabel('sumbu-x')
ylabel('sumbu-y')
zlabel('sumbu-z')
title('Grafik persamaan z.^2-x.^2-y.^2=4 dalam plot 3 dimensi')

z=[-5:.2:-2:3:.3:5];
theta=linspace(0,2*pi,36);
[z,theta]=meshgrid(z,theta);
r= sqrt((z.^2-4)./(cos(theta).^2+sin(theta).^2));
x=r.*cos(theta);
y=r.*sin(theta);
surf(x,y,z)
axis auto
xlabel('sumbu-x')
ylabel('sumbu-y')
zlabel('sumbu-z')
title('Grafik persamaan z.^2-x.^2-y.^2=4 dalam plot 3 dimensi')

c) Persamaan

=1

Mencari nilai absolute


+

=1

(r cos )2 +

z2 = 1

4(r cos )2 +

4z2 = 4

4 r2 cos2 + r2sin2 -4z2 = 4


4z2+4= r2(4 cos2 +sin 2 )
r=

Nilai absolute 4z2 + 4


4Z2

|2z| 2
|z|= 1

;x4

THETA=0:pi/12:2*pi;
Z=-6:.5:9;
[z,theta]=meshgrid(Z,THETA);
r=sqrt((z.^2-4)./(cos(theta).^2+sin(theta).^2));
x=r.*cos(theta);
y=r.*sin(theta);
surf(x,y,z)
view([115,60])
grid on
box on
axis auto
xlabel('sumbu-x')
ylabel('sumbu-y')
zlabel('sumbu-z')
title('Grafik persamaan x.^2+y.^2/4-z.^2=1 dalam plot 3 dimensi')

z=[-8:.3:-5:1:.7:9];
theta=linspace(0,2*pi,36);
[z,theta]=meshgrid(z,theta);
r= sqrt((z.^2-4)./(cos(theta).^2+sin(theta).^2));
x=r.*cos(theta);
y=r.*sin(theta);
surf(x,y,z)
axis auto
xlabel('sumbu-x')
ylabel('sumbu-y')
zlabel('sumbu-z')
title('Grafik persamaan x.^2+y.^2/4-z.^2=1 dalam plot 3 dimensi')

d) Persamaan

=1

Mencari nilai absolute


=1

;x 36
= 36

9x2 + 4y2 + 36z2 = 36


9(r cos )2 +4(r sin )2 +36 z2 = 36
9(r2 cos2 ) +4(r2 sin2 ) +36 z2 = 36
-36z2+ 36 = r2 (9 cos2 +4 sin2 )
r=

Nilai absolute 36 z2 + 36
36Z2

36

|6z| 6
|z| = 1

THETA=0:pi/12:2*pi;
Z=-2:.6:9;
[z,theta]=meshgrid(Z,THETA);
r=sqrt((36*z.^2+36)./(9*cos(theta).^2+4*sin(theta).^2));
x=r.*cos(theta);
y=r.*sin(theta);
surf(x,y,z)
view([10,50])
grid on
box on
axis auto
xlabel('sumbu-x')
ylabel('sumbu-y')
zlabel('sumbu-z')
title('Grafik persamaan x^2/4+y^2/9+z^2 dalam plot 3 dimensi')

z=[-5:.1:-5:1:.6:7];
theta=linspace(0,2*pi,36);
[z,theta]=meshgrid(z,theta);
r=sqrt((36*z.^2+36)./(9*cos(theta).^2+4*sin(theta).^2));
x=r.*cos(theta);
y=r.*sin(theta);
surf(x,y,z)
axis auto
xlabel('sumbu-x')
ylabel('sumbu-y')
zlabel('sumbu-z')
title('Grafik persamaan x^2/4+y^2/9+z^2 dalam plot 3 dimensi')

You might also like