drawing square sinusoidal functions
显示 更早的评论
How do i draw square sinusuidal functions
回答(3 个)
Star Strider
2019-6-5
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')

2 个评论
Star Strider
2019-6-5
Thank you!
Gordon Odira
2019-6-5
0 个投票
类别
在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
