Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to pass parameter to symbolic objective and constraint functions?

1 visualización (últimos 30 días)
Tao
Tao el 25 de Mayo de 2015
Cerrada: Walter Roberson el 25 de Mayo de 2015
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.

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by