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.

 採用された回答

ES
ES 2013 年 9 月 3 日
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);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by