Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding Off

Status
Not open for further replies.

dcharles

Mechanical
Joined
May 14, 2001
Messages
30
Location
GB
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?
 
say the value calculates to 7 then it would go to 5 or 10.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top