×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Rounding Off

Rounding Off

Rounding Off

(OP)
In an equation to determine a parameter using the CEIL command to determine the d.p. Is there any way I can round to the nearest 5 or 10?

RE: Rounding Off

(OP)
say the value calculates to 7 then it would go to 5 or 10.

RE: Rounding Off

Lets look at this example. Some value of a dimension (say d1) needs to be either 0 or 10. You can write the following relations:
/***************************
VALUE=d1-5
IF VALUE <5
d1=0
ELSE
d1=10
ENDIF
/****************************
The parameter VLAUE can be defined only in the relations if needed. I am not sure if this answers your questions, but it can be abuilding block of what you want.

Steve

http://www.3dlogix.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources