Info
此问题已关闭。 请重新打开它进行编辑或回答。
Find out how long after division will be an integer?
1 次查看(过去 30 天)
显示 更早的评论
Hello! Is it possible to know when the condition will be met, what has been divided and the result is an integer?
A=[1:100];
for i=1:30
Ax(i)=A(i)/2;
if Ax(i) not a fractional number
Ax(i)=Ax(i);
else
break
end
end
0 个评论
回答(2 个)
KSSV
2020-7-28
if mod(x,1)==0 then x is an whole number/ integer.
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!