How to create a Simulink model that gives output 1 if input is even and 0 if it's odd?

回答 (1 件)

Arunkumar M
Arunkumar M 2018 年 12 月 2 日

0 投票

Use the rem function using interpreted matlab function and then use a switch to get your desired output
temp.PNG

カテゴリ

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

製品

リリース

R2018b

質問済み:

2018 年 11 月 29 日

回答済み:

2018 年 12 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by