code for verifying whether 𝑓 is odd or even.

1 Ansicht (letzte 30 Tage)
Sai Teja Sunkari
Sai Teja Sunkari am 29 Jul. 2020
Beantwortet: Arthur Roué am 29 Jul. 2020
Mat-Lab code for verifying whether 𝑓 is odd or even.

Antworten (1)

Arthur Roué
Arthur Roué am 29 Jul. 2020
% Test if myVal is even
bIsEven = ~mod(myVal, 2)
And you can read mod and rem

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by