using testtype to check odd or even numbers
显示 更早的评论
In my code I try to use an 'if' operator to check whether a number is odd or even, so the code knows whether to proceed. So something like this:
if testtype(j, Type::Odd) = TRUE
statements
end
But that just gives the error:
Unexpected MATLAB operator.
1 个评论
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Type Checking 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!