matlab - How to pass a symbolic equation to constraints when using fmincon -
i have following problem: when using fmincon
need supply constraints. constrain .m file looks this:
function [c,ceq]=podmienky_l(ql) global podml zl c=[podml+0.0001-zl] ceq=[];
zl constant while podml symbolic variable contains expression: (22.1*cos(ql(4))(sin(ql(3))(0.35*sin(ql(1))
when try run fmincon error: user function returned complex value when evaluated;
but when replace variable podml (22.1*cos(ql(4))(sin(ql(3))(0.35*sin(ql(1)) works fine.
the equation in podml supplied script , can wary use use , can attain hideous proportions, impractical me hardwrite constraints function. have ideas?
thanks
Comments
Post a Comment