Fourier Series Expansion of a Periodic Square Wave

1 次查看(过去 30 天)
I have tried to code and plot the first 50 terms of the given graph; but i constantly failed.
x(t)= 4/pi ( sin(t) + sin(3t)/3 + sin(5t)/5+...+ sin(49t)/49)

回答(1 个)

Torsten
Torsten 2021-12-25
编辑:Torsten 2021-12-25
n = 49;
fun = @(t) 4/pi*sum(sin((1:2:n)*t)./(1:2:n));
T = linspace(0,2*pi,100);
X = arrayfun(fun,T);
plot(T,X)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by