- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » if else command when rounding numbers
Page Start Prev 1 Next End
if else command when rounding numbers
if else command when rounding numbers
Jun-27-17 10:59:02
I have a problem using modelica.. I am supposed to enter an equation in order to round to whole numbers using an if else command but i can't seem to figure it out on my own..
Can anyone help me?
My suggestion was something like this, but it doesn't work
if (omega_help(t_sol) > 0) then integer(floor(omega_help(t_sol) + 0.5)) else integer(ceil(omega_help(t_sol) - 0.5));
thank you in advance!
- lochel
- 45 Posts
Re: if else command when rounding numbers
Jun-27-17 11:42:43
Page Start Prev 1 Next End
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » if else command when rounding numbers
There are 0 guests and 0 other users also viewing this topic