Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Approximating decimal values to nearest whole number

    Dear All,
    Please help with some code(s) on how to approximate decimal values under a variable to nearest whole numbers - single digit. Thanks,
    Dapel
    Last edited by Zuhumnan Dapel; 15 Feb 2015, 17:38.

  • #2
    That is what round() does. But read the help for round(), ceil() and floor() and decide what you need.

    Comment


    • #3
      Thanks Dr Cox. It worked. I used the
      Code:
      replace  var=round( var,1)

      Comment

      Working...
      X