Fourier series doesnt overlap function
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
b = zeros(1,7);
x = linspace(-2,2,200);
f = ((8+x.^3)).^(1/2);
b0 = trapz(x,f);
for n = 1:7
y = f.*sin(n*pi*x/2);
b(n) = trapz(x,y);
end
fh = zeros(1,200);
for n = 1:7
fh = fh + b(n)*sin(n*pi*x/2);
end
fh = b0/2 + fh;
plot(x,f,'r','LineWidth',3)
hold on
plot(x,fh,'b','LineWidth',1)
hold off
legend('f','fh','Location','best')
title('N/A')
Can anyone see why the fourier series of f doesnt line up with the function f?
Respuestas (0)
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!