Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
How to pass parameter to symbolic objective and constraint functions?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!