How to convert a YALMIP sdpvar into a normal variable #1335
-
I am building code for MPC and the integration/discretization method I am using is Backward Euler. To solve the implicit equation, I am using MATLAB's fsolve function. However, it is giving me this error. Fsolve requires following inputs to be of data type double : "X0''. As X0 is being passed as a variable from YALMIP, I guess its not being able to read the inner contents. How to get the data out of an sdpvar variable. Any other clues for why this error is coming are also welcome. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It sounds like you are using the wrong tool. Incorporating a black-box function such as fsolve in a YALMIP model will not work |
Beta Was this translation helpful? Give feedback.
-
fsolve is a back-box which has various programming constructs,.i.e it is not just a mathematical operator, which is what YALMIP models |
Beta Was this translation helpful? Give feedback.
It sounds like you are using the wrong tool. Incorporating a black-box function such as fsolve in a YALMIP model will not work