回答 (3 件)

Star Strider
Star Strider 2019 年 6 月 5 日

1 投票

Just for fun, other options are:
t = linspace(0,10,250);
f = 100;
sqwv = sum(sin(2*pi*(1:2:27)'*t*f)./((1:2:27)'));
figure
subplot(2,1,1)
plot(t, sqwv)
ylim([-1.5 1.5])
title('Sum-of-sines')
subplot(2,1,2)
plot(t, sign(sin(2*pi*f*t)))
ylim([-1.5 1.5])
title('sign-of sine')
drawing square sinusoidal functions - 2019 06 05.png

2 件のコメント

Adam Danz
Adam Danz 2019 年 6 月 5 日
編集済み: Adam Danz 2019 年 6 月 5 日
The sign of sine is a nice approach. (+1)
Star Strider
Star Strider 2019 年 6 月 5 日
Thank you!

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

Gordon Odira
Gordon Odira 2019 年 6 月 5 日

0 投票

COommunications.PNG

2 件のコメント

Gordon Odira
Gordon Odira 2019 年 6 月 5 日
How do i draw that function
Star Strider
Star Strider 2019 年 6 月 5 日
The ‘sum-of-sines’ code approximates it.

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

Gordon Odira
Gordon Odira 2019 年 6 月 5 日

0 投票

Thanks

カテゴリ

ヘルプ センター および File Exchange で 2-D and 3-D Plots についてさらに検索

質問済み:

2019 年 6 月 5 日

コメント済み:

2019 年 6 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by