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!