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

Change to double precision

Change to double precision

I would like to change the number of digits shown in the result file.
For temperatures it is always 6 digits (123.456K for example) which in my case is not enough. I exported the results to see if the export file helps me with that issue but it does not.
Changing the tolerance also does not have an effect.

Any help would be welcome!

What I do now is:
print(String(T,significantDigits=8));
but there has to be a better way than a string...

Edited by: ToMaK - Apr-28-20 22:53:28

Re: Change to double precision

The .mat-file should always be exported with double precision unless you explicitly passed it

Code:

-single

. Open it in Matlab/Scilab/Octave and you should see the full precision.

There are 0 guests and 0 other users also viewing this topic