Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to pass parameter to symbolic objective and constraint functions?
1 次查看(过去 30 天)
显示 更早的评论
I'm using fmincon to do nonlinear optimization. In order to make program more robust and faster, I used symbolic toolbox to generate objective and constraint forcing functions and corresponding gradient and Jaccobians. However, there is one parameter (let's call it A here, a is a real and fixed number when fmincon is called) in these objective, constraint, and corresponding gradient and Jaccobians. I know how to deal the problem when A is 20, 30, 40 ect.. But in my main program where fmincon is called, I need A to change, for example, A = 20:1:30. And I don't want to generate the symbolic functions every time when A changes a value, and I don't want to use "subs" either since "subs" is very time consuming. Could anyone give me a help?
Thanks a lot.
1 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!