Minimum of function by vector parameters
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
[EDIT: Fri May 13 15:01:56 UTC 2011 - Clarify - MKF]
Hello
I'd like to find the minimum of the following function
function y=probability_financial(a,b,w,pm,z)
% w=[w1,w2]
% a=[a1 a2]
% b=[b1 b2];
% z-matrix (2x2) is defined,
% pm = [pm1, pm2]-vector, is defined
y = abs(pm(1)-w(1)/(1+exp(-a(1)-b(1)*z(1,1)))-w(2)/...
(1+exp(-a(2)-b(2)*z(1,2))))+abs(pm(2)-w(1)/...
(1+exp(-a(1)-b(1)*z(2,1)))-w(2)/(1+exp(-a(2)-b(2)*z(2,2))));
end
by the following variables w=[w1,w2], a=[a1 a2] b=[b1 b2]
Would you be so kind to explain to me how to implement this?
Thanks for your answers!
1 commentaire
Réponses (1)
Walter Roberson
le 13 Mai 2011
As you have an excess of unconstrained free variables, you can make some arbitrary choices and minimize exactly at those choices.
For example, Let
w(2) = 0
a(1) = arbitrary real value (does affect other variables)
a(2) = any real value (contribution will be ignored)
b(2) = any real value (contribution will be ignored)
Then
w(1) = pm(1)*exp((-a(1)*z(1,1)+a(1)*z(1,2)+ln(pm(2)/pm(1))*z(1,1))/(z(1,1)-z(1,2)))
b(1) = -ln(pm(2)/pm(1))/(z(1,1)-z(1,2))
will minimize to y = 0
0 commentaires
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!