Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Find out how long after division will be an integer?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
KSSV
am 28 Jul. 2020
if mod(x,1)==0 then x is an whole number/ integer.
2 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!