답변 (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