Problem finding maximum of a nonlinear problem
    2 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
I have the following problem.
Minimize  subject to
 subject to  and
 and 
 subject to
 subject to  and
 and 
My attempt as solutuion is as follows:
close all
clear
clc
fun = @(x) x(1)+x(2)+x(3); %minimize
lb = [];
ub=[];
x0 = [1 1 1];
A = [];
b=[];
Aeq=[];
beq=[];
x = fmincon(fun,x0,A,b, Aeq, beq, lb, ub, @constraints)
function [c,ceq] = constraints(x)
    c=[0 0];
    c(1) = (x(2)-1).^2+x(3).^2-1; % <=0
    c(2) = x(1).^2+(x(2)-1).^2+x(3).^2-3;
    ceq = [];
end
Unfortunately, this does not work, since I get as a result 
x =
1.0e+52 *
   -8.2469   -0.0000   -0.0000
I know that the solution should be  but I cannot see what I am doing wrong. Can someone please help me?
 but I cannot see what I am doing wrong. Can someone please help me?
 but I cannot see what I am doing wrong. Can someone please help me?
 but I cannot see what I am doing wrong. Can someone please help me?Best regards.
3 Kommentare
Antworten (0)
Siehe auch
Kategorien
				Mehr zu Linear Least Squares finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

