How to compute cost function for fmincon?
Mostra commenti meno recenti
Hi all, I'm performing an optimization using fmincon as follows:
r=[0.22 9.94 0.08;
0.16 0.95 0.08;
0.07 0.87 0.08];
R = [0.49; 0.42; 0.19];
x = fmincon(@(x) norm(r*x-R)^2, ones(3,1)/3, [], [], ones(1,3), 1, zeros(3,1), []);
Here, I wan to use a cost function for this optimization.
where
, and x is a vector of initial guess values.
Could you somebody help me with this?
1 Commento
Matt J
il 21 Set 2020
The cost function you have shown is vector-valued. Do you mean to minimize its Euclidean norm?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Nonlinear Optimization in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!