Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

Topic: Problems on Fmincon
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Jonas

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
end
[t,x] = ode45(@mimo,[t0 t0+ts],x0);
[row,col] = size(x);
x0 = x(row,:)';
data_u(:,k)=u;
k=k+1;
du(2*Hu*in+1:2*Hu*in+in)=u; %du(9:10) -> u = u(k-1)
t0 = t0+ts;
end

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
c=0:5:200;

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

Jonas



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.