Closed NanjunLv closed 1 year ago
No, as I said, your only way out is to either setup optimizer objects, or use persistent variables in your external function so that you don't redefine the variables and problem from scratch every time in there.
Thank you very much for your answer. Can you write a simple example?
ange with the loop. Since yalmip takes a lot of time to process the constraints, I would like to put the constraints outside the loop body and the objective function inside the loop body and use yalmip('clear') to clear the specified objective function at each loop, is this possible?