Why doesn't the less than operator work inside a for loop for decimals
古いコメントを表示
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
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!