In simulink, how to generate a square wave using an external source as frequency?

I want to generate a square wave where frequency is coming from an external source. In simulink square wave block, frequency parameter is hard coded.

 Respuesta aceptada

you can use a normal Pulse generator block in Simulink and use set_param command to set any of the parameters like Amplitude, Period, PulseWidth, PhaseDelay, SampleTime etc.
set_param('Pulse Generator Block','Period',12);

Más respuestas (0)

Categorías

Más información sobre Simulink en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 3 de Sept. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by