drawing square sinusoidal functions
Mostrar comentarios más antiguos
How do i draw square sinusuidal functions
Respuestas (3)
Star Strider
el 5 de Jun. de 2019
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')

Gordon Odira
el 5 de Jun. de 2019
0 votos
2 comentarios
Gordon Odira
el 5 de Jun. de 2019
Star Strider
el 5 de Jun. de 2019
The ‘sum-of-sines’ code approximates it.
Gordon Odira
el 5 de Jun. de 2019
0 votos
1 comentario
Star Strider
el 5 de Jun. de 2019
My pleasure.
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
