You are on page 1of 3

Nama : Muhammad Alifiansyah Kurniawan

Nim : 061930331265
Kelas : 2 TD Teknik Telekomunikasi
Dosen Pembimbing : Sholihin, S.T.,M.T.
Tanggal Tugas : 13 April 2020

---------------------------------------------------------------------------------
1. Program Pertama
Kode Program :

>> clear
>> x=linspace(0,15,1000);
>> y1=exp(-x); plot(x,y1);
>> grid on
>> hold on
>> y2=exp(-2*x); plot(x,y2);
>> y3=exp(-1*x); plot(x,y3);
>> y4=exp(-0.5*x); plot(x,y4);
>> xlabel('sumbu-x'), Program 1

ylabel('sumbu-y')
>> title('Fungsi eksponensial negatif')

2. Program Kedua
Kode Program :
>> clear
>> x=10:0.1:100;
>> y=x.^2;
>> plot(x,y)
>> xlabel('Sumbu X'), ylabel('Sumbu Y')
>> title('Kurva Y=X^2')
>> grid on

Program 2
3. Program Ketiga
Kode Program :
>> clear
>> x=linspace(10,5,1000);
>> y1=exp(-x); y2=exp(-0.2*x); y3=exp(-0.4*x);
>> y4=exp(-0.6*x);
>> plot(x,y1,x,y2,x,y3,x,y4)
>> grid on
>> xlabel('sumbu-x'), ylabel('sumbu-y')
>> title('Kurva y = exp(-Ax)')
>> legend('A=1','A=0.2','A=0.4','A=0.6')
Program 3

4. Program Keempat
Kode Program :
>> figure
>> theta=linspace(0,4*pi,100);
>> rho=(cos(theta.*5)).^3;
>> polar(theta,rho);

Program 4

5. Program Kelima
Kode Program :
>> X = [10 40 40 10 10];
>> Y = [5 5 20 20 5];
>> Z = [0 0 60 60 0];
>> plot3(X,Y,Z); grid on;
>> xlabel('sumbu X'); ylabel('sumbu
Y');
>> zlabel('sumbu Z');

Program 5
>> title ('Contoh plot 3-D');
>> axis([0 60 0 30 0 80])

6. Program Keenam
Kode Program :
>> t=0:0.1:100;
>> X=sin(t); Y=cos(t); Z=t;
>> plot3(X,Y,Z)
>> xlabel('sumbu X');
>> ylabel('sumbu Y');
>> zlabel('sumbu Z');
>> title ('Putar Putar');

Program 6

You might also like