This solution is outdated. To rescore this solution, sign in.
-
4 Comments
Show
1 older comment
Jonathan Perry
on 26 Jan 2016
It seems to provide the desired solution. Could anyone tell me why this is an incorrect solution?
auto2060
on 8 Jul 2016
The output should be logical,and it should't be char type:
function tf = is_it_odd(n)
x = n/2;
y = floor(x);
if x == y
tf = false;
else
tf = true;
end
end
SIVAPRAKASH DANABALASINGAM
on 10 Jan 2017
good job
Vivek Singh
on 14 Nov 2018
good solution
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!