You are on page 1of 4

clc

clf
t=0:0.2:2*pi;
V1=sin(t)
V11=sin(t-(1+pi))
n=0:0.2:2*pi;
V2=sin(n)
V21=sin(n-(1+pi))
subplot(2,1,1),plot(t,V1),
hold on
grid
subplot(2,1,1),plot(t,V11,'r')
subplot(2,1,2),stem(n,V2,'filled')
hold on
grid
subplot(2,1,2),stem(n,V21,'filled','m')

1
0.5
0
-0.5
-1

1
0.5
0
-0.5
-1

clc
clear
clf
k=-4:1:6;
A=[0 0 -3 -1 0 1 2 3 4 5 0 ];
s=size(A);
for n=1:s(2)
Input(n)=A(n);
end
Input
for n=3:s(2)
Outtunda(n)=A(n-2);
end
Outtunda
Outmaju=zeros(1,s(2))
for n=1:s(2)-1
Outmaju(n)=A(n+1);
end
Outmaju
a=plot(k,Input);
grid
title('sinyal input dalam domain waktu x(t)')
xlabel('waktu t, (detik)')
ylabel('amplitudo, x(t)')
hold on
b=plot(k,Outtunda,'r');
c=plot(k,Outmaju,'m');
legend([a,b,c],'Input','Out Tunda','Out maju')

sinyal input dalam domain waktu x(t)


5
Input
Out Tunda
Out maju

amplitudo, x(t)

3
2
1
0
-1
-2
-3
-4

-3

-2

-1

0
1
2
waktu t, (detik)

clc
clear
clf

A=[0 0 1 0 1 2 0 0];
Input=A
s=size(A);
for n=3:s(2)
Output(n)=A(n)+2*A(n-1)+3*A(n-2);
end
Output
k=-1:1:6;
subplot(2,1,1),a=stem(k,Input,'filled');
grid
title('Sinyal Input(k)')
xlabel('k')
ylabel('Amplitudo')
hold on
subplot(2,1,2),b=stem(k,Output,'r','filled');
grid
title('Sinyal Output (k)')
xlabel('k')
ylabel('Amplitudo')

Sinyal Input(k)

Amplitudo

2
1.5
1
0.5
0
-1

3
k
Sinyal Output (k)

Amplitudo

8
6
4
2
0
-1

3
k

You might also like