How to maximize system of linear equations?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Clarisha Nijman
el 26 de Nov. de 2018
Comentada: Clarisha Nijman
el 1 de Dic. de 2018
Hello,
Given:
A=[4 3; -1 7; 5 9; 2 4];
x=[x1;x2];
b=[b1; b2; b3; b4];
How can I maximize the linear system of equations: Ax=b?
4 comentarios
Matt J
el 26 de Nov. de 2018
Editada: Matt J
el 26 de Nov. de 2018
associated with the maximum possible value of b1, b2, b3 and b4
So the idea is to make all b1..b4 as large as possible? Then clearly x=0 and y=Inf are optimal in the example you've shown. They result in b1=b2=b3=b4=Inf.
More generally, though, you cannot simultaneously maximize the right hand side elements b, because they co-depend on the same variables.
Respuesta aceptada
Matt J
el 26 de Nov. de 2018
Editada: Matt J
el 27 de Nov. de 2018
6 comentarios
Matt J
el 30 de Nov. de 2018
Editada: Matt J
el 30 de Nov. de 2018
Runs fine for me. Here is my complete implementation.
C=[ 0.0038 0.0038 0.0038 0.0038
0.0037 0.0037 0.0037 0.0037
0.0036 0.0036 0.0036 0.0036
0.0034 0.0034 0.0035 0.0035
0.0033 0.0033 0.0034 0.0034
0.0032 0.0032 0.0033 0.0033
0.0031 0.0031 0.0032 0.0033
0.0029 0.0029 0.0031 0.0031
0.0028 0.0028 0.0029 0.0028
0.0027 0.0027 0.0024 0.0023];
A1=C(:,2:end);
A2=-C(:,2:end);
Aleq=[A1;A2];
%The less equal RHS
bleq=[C(:,1) -C(:,1)];
Aeq=ones(3,1);
beq=1;
lb=zeros(3,1);
ub=[];
%initial guess
x0=0.1*rand(3,1);
%Defining the objective function
Cs=C(:,2:4);
[OptArgum, optimalVal] = fminimax(@(x) Cs*x,x0,Aleq,bleq(:),Aeq.',beq,lb,ub);
Más respuestas (0)
Ver también
Categorías
Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!