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 ビュー (過去 30 日間)
古いコメントを表示
I am totally new to MATLAB and am unsure of how to tackle this problem. Any suggestions?
1 件のコメント
Geoff Hayes
2020 年 6 月 4 日
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.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!