Info
This question is closed. Reopen it to edit or answer.
variables problem , infinite loop
1 view (last 30 days)
Show older comments
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 Comments
Answers (2)
Azzi Abdelmalek
on 1 Nov 2013
format long
id1=0.513709476164662
id2=0.513709476164661
id1=str2num(sprintf('%.14f',id1))
id2=str2num(sprintf('%.14f',id2))
id1==id2
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!