How to use matlab to find an optimized matrix with regarding to minimization of a norm?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I’m trying to solve a minimization problem whose purpose is to optimize a matrix, where the multiplication with a vector is close to another vector. But I have some problems to execute it by using Matlab. The problem is illustrated as follows:

The summation goes to 15, because there are 15 unique vector pairs of u and b. Which function in Matlab can I use to solve this issue? I thought “fmincon” is an option, but I could not get the input parameters correct
X0=ones(1,9)/3;
Aeq=
beq=ones(3,1);
ub=2*ones(1,9);
lb=-2*ones(1,6);
x = fmincon(????,x0,[],[],Aeq,beq,lb,ub);
2 commentaires
Réponses (1)
Torsten
le 1 Août 2016
Try
function main
Aeq=[1 1 1 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0
0 0 0 0 0 0 1 1 1];
beq=ones(3,1);
lb=-2*ones(1,9);
ub=2*ones(1,9);
U=horzcat(u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15);
B=horzcat(b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15);
x0=ones(1,9)/3;
fun=@(x)(norm([x(1) x(2) x(3);x(4) x(5) x(6);x(7) x(8) x(9)]*U-B,'fro'));
x=fmincon(fun,x0,[],[],Aeq,beq,lb,ub);
Best wishes
Torsten.
Voir également
Catégories
En savoir plus sur Surrogate Optimization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
