I have no idea why matlab does not understand this simple if function, any idea?
1 view (last 30 days)
Show older comments
Amirhossein
on 24 Dec 2013
Commented: Amirhossein
on 24 Dec 2013
Simply put, this if condition never gets satisfied. It does work for other ns like 0 0.2,1.6,2 etc but does not work for n==1.2. Is this a software bug? I am using Matlab R2012a
for n=0:0.2:2
if n==1.2
test1=1
end
end
Thanks
0 Comments
Accepted Answer
More Answers (0)
See Also
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!