How to do a rem while loop?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone. I need the h value to be an integer, I can't have decimals. Therefore, I think a while loop with the function rem is needed but I have no idea how to do it.
0 commentaires
Réponses (1)
Walter Roberson
le 3 Déc 2020
while true
h = input('Enter the desired grid spacing: ');
if isnumeric(h) && isscalar(h) && h > 0 && rem(h,1) == 0; break; end
end
0 commentaires
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!