0% found this document useful (0 votes)
17 views1 page

% Scrib Plot Nomor B: For For

This document contains MATLAB code that: 1) Plots the magnitude and phase responses of a filter. 2) Plots the Fourier coefficients of a signal. 3) Generates three signals by summing weighted Fourier coefficients and plots each signal.

Uploaded by

Indra Yugi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

% Scrib Plot Nomor B: For For

This document contains MATLAB code that: 1) Plots the magnitude and phase responses of a filter. 2) Plots the Fourier coefficients of a signal. 3) Generates three signals by summing weighted Fourier coefficients and plots each signal.

Uploaded by

Indra Yugi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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