You are on page 1of 2

for i=1:1:ct

for n = 1:2:19
bn = 4/(n*%pi);
serie(i) = serie(i)+ an*cos(n*w0*t(i)) + bn*sin(n*w0*t(i));
end
end

V = struct('time', t', 'values', serie'); plot(t,serie)

t = 0:1/5000:(1/80 - 1/5000); ct = length(t);

serie = zeros(1, ct);


for i= 1:1:ct
for n = 1:2:19
bn = 4/(n*%pi);
serie(i) = serie(i)+ an*cos(n*w0*t(i)) + bn*sin(n*w0*t(i));
end
end
f = 0:80:(ct - 1)*80; AA = 2*abs(fft(serie))/ct; figure;
plot2d3(f,AA);

for i=1:1:ct
for n = 1:2:19
bn = 4/(n*%pi);
serie(i) = serie(i)+ an*cos(n*w0*t(i)) + bn*sin(n*w0*t(i));
end
end

V = struct('time', t', 'values', serie'); plot(t,serie)

t = 0:1/5000:(1/80 - 1/5000); ct = length(t);

serie = zeros(1, ct);


for i= 1:1:ct
for n = 1:2:19
bn = 4/(n*%pi);
serie(i) = serie(i)+ an*cos(n*w0*t(i)) + bn*sin(n*w0*t(i));
end
end
f = 0:80:(ct - 1)*80; AA = 2*abs(fft(serie))/ct; figure;
plot2d3(f,AA);

deltaW = 10;
Wmax 1e4;
N = 1000;
Ts = 1/20000;

W = -Wmax:deltaW:Wmax; cw = length(W); ts = -N/2*Ts:ts:N/2*Ts;


cts = length(ts);
h = zeros(1, cts);

C = 01.*(%i*W).^4 + 2200*(%i*W).^3 + 2.81e7*(%i*W).^2 + 1.66e11*(%i*W) + 9e13;


C = C./((%i*W).^4 + 22000*(%i*W).^3 + 1.81e8*(%i*W).^2 + 6.6e11*(%i*W) + 9e14;

for n = 1:1:cw
h = h + (1/C(n))*exp(%i*W(n)*ts);
end
saida = A.values;
h= real(h);
exec('C:\Users\aluno\Desktop\convolucap.sce')
yy = convulucao(saida, h);
t = 0:0.00005:0.4;
plot(t,yy)

You might also like