Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: fmincon function error

$
0
0
Chris,

Thanks for reverting on this.

2012a Student version

@nLinCons calls this function nLinCons:

        function [c,ceq]=nLinCons(x)
            c(1) = T*x(3)^2 - 1; %constriant (nu^2*T)<1
            ceq = [];
        end

When running the code, don't seem to see where x(3) is set and therefore hence the possible problem. This is code that I have inherited and am working through it to see if issues with it and to be honest not fully au fait with the workings.

Is there any way of returning the parameter values set for @nLinCons. Stepping through the code does not seem to allow me to obtain the values passed. Is there way of getting the values passed? Also, is there workaround maybe by passing the values for c and ceq directly into fmincon vs using the calling fn @nLinCons .

Thanks
Gerry

"Chris " <cfweise@yahoo.com> wrote in message <ksdvbm$9lk$1@newscl01ah.mathworks.com>...
> What version of Matlab are you using?
> What value of @nLinCons are you passing?

Viewing all articles
Browse latest Browse all 19628

Trending Articles