how to let my code just consider the demical number ??
Show older comments
Dear friends
sorry for bothering you guy, can anyone help how to code, asking matlab to only consider the decimal
for example 45.789
I just be coding need to detect the numbers after (.), in another words I need to detect only 789
maybe my question is so silly but sorry due to lack of my knowledge
Thanks a lot guys
1 Comment
Walter Roberson
on 27 Dec 2017
Is the input a string? Because if it is floating point then there are multiple valid answers. Remember that floating point numbers are not stored in decimal and that 1/10 cannot be exactly represented in floating point, much the same way that 1/3 cannot be exactly represented in finite decimal
Accepted Answer
More Answers (1)
Muhammad RSMY
on 27 Dec 2017
0 votes
Categories
Find more on Logical 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!