フィルターのクリア

Matlabs square(x) equivalent in Simulink? NOT x^2. square WAVE

202 ビュー (過去 30 日間)
Marek Andrzej
Marek Andrzej 2016 年 10 月 19 日
コメント済み: Marek Andrzej 2016 年 11 月 1 日
As in title, is there a block which performs this operation in a simple way?

回答 (2 件)

Rodney Tan
Rodney Tan 2016 年 10 月 19 日
There is a Math Function block in Simulink -> Math Operation, where you can configure it to perform various math operation including the square function. I have screen capture it for your reference below.
Hope this answer your question.
  1 件のコメント
Marek Andrzej
Marek Andrzej 2016 年 10 月 19 日
This is exactly what I am not looking for. A square(x) in matlab is this : Square wave

サインインしてコメントする。


Rodney Tan
Rodney Tan 2016 年 10 月 24 日
There is a Pulse Generator block in Simulink -> Source, where you can configure its magnitude, period and duty cycle to generates square wave as square(x) wave function. I have screen capture it for your reference below.
Hope this time I answer your question.
  1 件のコメント
Marek Andrzej
Marek Andrzej 2016 年 11 月 1 日
I didn't want to generate it, but managed to create a workaround:
which allowed me to change a signal of variable amplitude and freq into square form (although I moved it a bit to the right) By the way can you tell me why Minimum index- Maximum index was able to give me a square wave? Wrap to zero and abs are there to make the line "pretty".

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSources についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by