Why doesn't the less than operator work inside a for loop for decimals
Afficher commentaires plus anciens
Im trying to get the following code to work. but every time the value of x goes below 0.6 even though it an if condition is set to prevent it..can someone help
x=0.8;
for n=1:10
if (x>0.6)
x=x-0.1;
end
x
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical 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!