saving . . . saved Complex numbers in the modelica has been deleted. Complex numbers in the modelica has been hidden .
Complex numbers in the modelica
Title
Question
Hi, 
I am working on problems which involves complex numbers. Specifically, I solving set of equations and few parameters of results are complex numbers. Now I wanted to separate Real and Imag part of it for further usage but not able to separate it. It is similar as Re and Im functions in MATLAB. Please help me out with it. 

Thanks 

OpenModelica Functions-and-Types 00-01 min 0-10 sec 16-11-18, 2:57 p.m. ashishmanimishra@gmail.com

Answers:

If num is the complex number defined in OpenModelica. You can access the real part of num as num.re and imaginary part as num.im. If num is array, then use num[index].re for real part and num[index].im for imaginary part.
28-11-18, 5:35 p.m. kaushikdatta


Log-in to answer to this question.