fmincon how can I solve it?
Show older comments
Why is it not working?
function [ J ] = objfun( x )
%Objective function
P=25.0231; E=2; h=2;
J=((P*h)/E)*(1/(X(1)+sqrt(2)*x(2)));
end
function [ c,ceq ]=myconfun22( x )
%Constraint functions
S=0.0092; P=25.0231;
c=[(P*(x(2)+sqrt(2)*x(1))/(sqrt(2)*(x(1)^2)+2*x(1)*x(2))))-17.5;
(P/(x(1)+sqrt(2)*x(2)))-17.5*(1+0.1*S);
(-P*x(2))/(sqrt(2)*(x(1)^2)+2*x(1)*x(2))+1.2;
0.2-x(1);
x(1)-6*(1+0.2)*S;
0.2*(1-0.1*S)-x(2);
x(2)-6];
ceq=[];
What should I do to get the optimized value?
1 Comment
Walter Roberson
on 20 Feb 2016
You do not show your call to the optimizer. You also do not indicate what difficulties you are observing.
Accepted Answer
More Answers (0)
Categories
Find more on Choose a Solver in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!