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

40 views (last 30 days)
The output must be displayed through a scope.

Answers (1)

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

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!