Fourier Series Expansion of a Periodic Square Wave

2 ビュー (過去 30 日間)
Tolgay Polat
Tolgay Polat 2021 年 12 月 25 日
コメント済み: John D'Errico 2021 年 12 月 25 日
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 件のコメント
John D'Errico
John D'Errico 2021 年 12 月 25 日
Please remember that we are not here to do student homework assignments.

サインインしてコメントする。

回答 (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 Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by