How does round work?
4 views (last 30 days)
Show older comments
I was trying to figure out how the function round worked. I know the format and everything, I am talking about the actual source code. I tried typing in EDIT round but only instructions came up. The only thing that I can think of is if you have a number like 3.14 you would have to convert that number to a string to determine what character the decimal point is at. From there you can take the number to the right and continue with the appropriate rounding. I just don't understand how MATLAB determines where the decimal is located. Any guesses?
0 Comments
Answers (2)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!