Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » tina0606
  • » Profile

Posts

Posts


https://openmodelica.org/images/agorapro/attachments/5832/mini_Unbenannt.PNG

(line 452)
I don't know why it doesn't work..

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!

  • Index
  • » Users
  • » tina0606
  • » Profile
You are here: