Saarland University
Lehrstuhl für Automatisierungstechnik

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Round function?, Round function?
goo
post Dec 12 2009, 07:18 PM
Post #1


Newbie
*

Group: Members
Posts: 6
Joined: 16-February 07
Member No.: 488



Hi,

I don't know of any function like that.

I guess that you do not want to use if statements because you want to avoid generating events. In that case have a look at Modelica.Media.Common.smoothStep. Some of the ideas in here might be helpful for you to create a numerically efficient function to perform your task.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
MrBlonde81
post Dec 3 2009, 07:53 AM
Post #2


Member
**

Group: Members
Posts: 11
Joined: 7-December 07
Member No.: 4,660



Hello,

I am doing a calculation in one of my models and I want to trunkate the result in a subtraction, i.e. if the nubmers have at least lets say 5 significants digits in common I want to round the result to zero.

Does somebody know of any built in function for this in Modelica, i.e. without using if-cases etc.?

MrBlonde
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 23rd September 2019 - 05:29 PM