How do I Create a function named “evennum” that returns 2 if its argument is even, and 1 if its argument is odd, using either the built in mod or floor functions on MATLAB?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am totally new to MATLAB and am unsure of how to tackle this problem. Any suggestions?
1 Kommentar
Geoff Hayes
am 4 Jun. 2020
Victoria - see Declare function name, inputs, and outputs for details on how to create a function. Also, see Start learning MATLAB and Simulink with free tutorials.
Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!