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.

 Réponse acceptée

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);

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by