The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » sci.math.* » sci.math.symbolic

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Problems on Fmincon
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 2
Registered: 1/9/12
Problems on Fmincon
Posted: May 19, 2012 9:06 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear friends,
I have problems on my fmincon command which shows this statement "FMINCON cannot continue because user supplied objective function failed with the following error:
Index exceeds matrix dimensions."

My Program are these:

for j=c

y(k,:) = C*x0 + D*u;
du = fmincon(@kriteria2, du, F, G, Feq, Geq, [], [],'', options);
u = du(1:in)+ du(2*Hu*in+1:2*Hu*in+in);
for i=1:in
if u(i) < umin, u(i) = umin; end
if u(i) > umax, u(i) = umax; end
[t,x] = ode45(@mimo,[t0 t0+ts],x0);
[row,col] = size(x);
x0 = x(row,:)';
du(2*Hu*in+1:2*Hu*in+in)=u; %du(9:10) -> u = u(k-1)
t0 = t0+ts;

with these additions:
from @kriteria2 is:
v = kriteria2 (xaug)
size of all those variables are:
v = 1x1
du = 10x1
F = 16x10
G = 16x1
Feq = 4x10
Geq = 4x1

This program runs okay for MPC/Model Prediction Control.
But, when I add "offline recursive" on this MPC program, it shows that problem..

Anyway could help?

Thank you


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.