if statement inside a for loop not working
Show older comments
Hi all,
Can someone please explain why this code is not working?
for a = 0.1:0.1:5
if a == 3
b = 1;
end
end
Once 'a' becomes 3, 'b' should be assigned a 1. But nothing happens.. Not sure what is going on
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!