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

Aaaaaaaaaaaaaaa

Aaaaaaaaaaaaaaa
Aaaaaaaaaaaaaaaa
Aaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
clear all;
% scrib plot nomor b
w=linspace(-10,10,1000);
y = 1./((2/(4*pi*1000000))*((1i.*w).^2+(45/(pi*10000))*(1i.*w)+1));
magn=abs(y);
fase=angle(y);
subplot(1,2,1);
plot(w,magn);
subplot(1,2,2);
plot(w,fase);

%scrib plot nomo d


figure;
k=linspace(-10,10,21);
T=0.0030;
w0=2*pi/T;
bk1=sin(0.5*pi.*k);
bk2=((2/(4*pi*1000000))*((1i*(w0.*k)).^2+(45/(pi*10000))*(1i*(w0.*k))+1))
bk=bk1./bk2;
bk(11)=0;
plot(k,abs(bk));

%scrib plot e
N=[2 3 15];
waktu=100;
t=linspace(0,0.01,waktu);
matrik=zeros(waktu,N);
matrik2=zeros(waktu,1);
matrik3=zeros(waktu,3);

for n=1:3
for k=1:N(n)
y2=bk(k)*exp(i*k*w0.*t);
y2=y2';
matrik(:,k)=y2;
end
for k=1:waktu
matrik2(k)=sum(matrik(k,:));
end
matrik3(:,n)=matrik2;
end
figure;
subplot(3,1,1);
plot(t,matrik3(:,1));
subplot(3,1,2);
plot(t,matrik3(:,2));
subplot(3,1,3);
plot(t,matrik3(:,3));

You might also like