how to design a single cycle square wave?
Mostrar comentarios más antiguos
I want to design a single cycle square wave and for theat I am using 'square' function but I don't know how to make it a single cycle wave.
I'm not exactly sure that for this purpuse I need to change the duty cycle or not, however I feel that's the case. But I wanted to ask professionals here to assure that.
This is my code for that:
f0=2.25e6;
fs=100e6;
t2=0:1/fs:2/f0;
offset=0;
amp=1;
duty=50;
sq_wav=offset+amp*square(2*pi*f0.*t2,duty);
plot(t2,sq_wav)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Pulse and Transition Metrics 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!

