code for verifying whether 𝑓 is odd or even.

1 vue (au cours des 30 derniers jours)
Sai Teja Sunkari
Sai Teja Sunkari le 29 Juil 2020
Mat-Lab code for verifying whether 𝑓 is odd or even.

Réponses (1)

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

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by