using break and continue to using true extend ?
Afficher commentaires plus anciens
Hi guys,
I am trying to get input in the true interval such as that if m value interval 0<m<20 continue to process(jump to next row), but m>20 break the process with error message. How can ı do that with while or for and continue, break functions can anyone help me ?
Mass = input('please enter the mass');
while 0<Mass || Mass<20
continue
end
while Mass>20
break
fprintf('the wrong extend of value');
end
I have tried that but doesn't process. Could you help me ?
1 commentaire
Walter Roberson
le 16 Fév 2020
What should happen for m <= 0 ? It should not continue to process, but it should also not generate an error message ?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Discontinuities dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!