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

41 次查看(过去 30 天)
The output must be displayed through a scope.

回答(1 个)

Arunkumar M
Arunkumar M 2018-12-2
Use the rem function using interpreted matlab function and then use a switch to get your desired output
temp.PNG

类别

Help CenterFile Exchange 中查找有关 Programmatic Model Editing 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by