how to write the equation in matlab as attached in file?
3 views (last 30 days)
Show older comments
i am unable to write the condition (even odd ) given in equation so help,
0 Comments
Accepted Answer
KSSV
on 29 Aug 2017
for i = 1:10
if mod(i,2)
fprintf('%d is odd\n',i)
else
fprintf('%d is even\n',i)
end
end
1 Comment
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!