Info
此问题已关闭。 请重新打开它进行编辑或回答。
variables problem , infinite loop
1 次查看(过去 30 天)
显示 更早的评论
when I push ctrl+c , I see id1 and id2.
id1 0.513709476164662
id2 0.513709476164661
if they are equal ,the loop will end how can delete last numbers after comma
0 个评论
回答(2 个)
Azzi Abdelmalek
2013-11-1
format long
id1=0.513709476164662
id2=0.513709476164661
id1=str2num(sprintf('%.14f',id1))
id2=str2num(sprintf('%.14f',id2))
id1==id2
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!