Minimum of function by vector parameters
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
[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 comentario
Respuestas (1)
Walter Roberson
el 13 de Mayo de 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 comentarios
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!