How to convert casadi.MX value to matlab double precision?

2,456 views
Skip to first unread message

fzm...@gmail.com

unread,
Nov 7, 2018, 11:13:37 PM11/7/18
to CasADi
Hi, How to convert casadi.MX value to matlab double precision? 

Joris Gillis

unread,
Nov 8, 2018, 3:46:47 AM11/8/18
to CasADi
Hi!

There's not many situations where this is a legitimate thing to do, but anyway:
full(evalf(expression))

Best regards,
  Joris

fzm...@gmail.com

unread,
Nov 8, 2018, 4:42:55 AM11/8/18
to CasADi
Hi, Joris
    Many thanks. Following your suggestion, I have resolve my problem. 
    Could you tell me how to reset the default setting value for ipopt? Do you have examples or document that has instruction for the set of solver?
 
Thank you very much. 
Zemin

Joris Gillis

unread,
Nov 8, 2018, 4:48:55 AM11/8/18
to CasADi
Better post a new topic for this, but do elaborate a bit since I didn't understand what you meant.

   Joris

Marco Aurélio S. Aguiar

unread,
Nov 9, 2018, 10:19:02 AM11/9/18
to CasADi
Still in the same subject, is there a unified way to convert SX and MX to DM?
- SX can be converted by DM(SX)
- MX can be converted by MX.to_DM()

Dave Goel

unread,
Feb 19, 2019, 1:12:04 AM2/19/19
to CasADi
(As Joel posted) evalf works for both, and results in a DM in each case. 
Reply all
Reply to author
Forward
0 new messages