Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Tugas pdd

Nama : adha
Nim : g1b010005
1. fungsi cos (t)
clc
clear all
time = [0:0.001:0.099];
x = cos(0.1*pi*(0:99));
plot(time,x)
xlabel('time (msec)')
ylabel('x(t)')
2. grafik

3. fungsi sin (t)


clc
clear all
time = [0:0.001:0.099];
x = sin(0.1*pi*(0:99));
plot(time,x)
xlabel('time (msec)')
ylabel('x(t)')

Fungsi tan(t)
clc
clear all
time = [0:0.001:0.099];
x = tan(0.1*pi*(0:99));
plot(time,x)
xlabel('time (msec)')
ylabel('x(t)')

4. a. y(t)= sin(t) + cos(t)


clc
clear all
time = [0:0.001:0.099];
x = sin(0.1*pi*(0:99));
y = cos(0.1*pi*(0:99));
z = x + y;
plot(time,z)
xlabel('time (msec)')
ylabel('y(t)')

b. y(t)= sin2(t)
clc
clear all
time = [0:0.001:0.099];
x = sin(0.1*pi*(0:99));
y = x.^2;
plot(time,y)
xlabel('time (msec)')
ylabel('y(t)')

c.

y(t)= sin2(t) + cos2(t)


clc
clear all
time = [0:0.001:0.099];
x = sin(0.1*pi*(0:99));
y = x.^2;
a = cos(0.1*pi*(0:99));
b = a.^2;
z = y+b;
plot(time,z)
xlabel('time (msec)')
ylabel('y(t)')

5. a. fungsi cos (t)


clc
clear all
time = [0:0.001:0.099];
x = cos(0.1*pi*(0:99));
stem (time,x)
xlabel('time (msec)')
ylabel('x(t)')

b. fungsi sin (t)


clc
clear all
time = [0:0.001:0.099];
x = sin(0.1*pi*(0:99));
stem(time,x)
xlabel('time (msec)')
ylabel('x(t)')

c. Fungsi tan(t)
clc
clear all
time = [0:0.001:0.099];
x = tan(0.1*pi*(0:99));
stem(time,x)
xlabel('time (msec)')
ylabel('x(t)')

d. y(t)=

sin(t) + cos(t)

clc
clear all
time = [0:0.001:0.099];
x = sin(0.1*pi*(0:99));
y = cos(0.1*pi*(0:99));
z = x + y;
stem (time,z)
xlabel('time (msec)')
ylabel('y(t)')

e. y(t)=

sin2(t)

clc
clear all
time = [0:0.001:0.099];
x = sin(0.1*pi*(0:99));
y = x.^2;
stem (time,y)
xlabel('time (msec)')
ylabel('y(t)')

f. y(t)= sin2(t) + cos2(t)


clc
clear all
time = [0:0.001:0.099];
x = sin(0.1*pi*(0:99));
y = x.^2;
a = cos(0.1*pi*(0:99));
b = a.^2;
z = y+b;
stem (time,z)
xlabel('time (msec)')
ylabel('y(t)')

You might also like