square wave not "limited"
Afficher commentaires plus anciens
hi, I produced this square wave signal, but as you can see the square peaks have no upper limit. how can i solve?
x=0.03*square(f*t,duty)

in reality I seem to see that the graph is the other way around
Réponse acceptée
Plus de réponses (1)
Doesn't seem to have any issue.
t = linspace(0, 3*pi, 3001)';
f = 2;
duty = 50;
x = 0.03*square(f*t, duty);
plot(t/pi, x, t/pi, 0.03*sin(2*t))
grid on
ylim([-0.05 0.05])
Catégories
En savoir plus sur Time Series dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
