I have no idea why matlab does not understand this simple if function, any idea?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!