What does this script mean?
显示 更早的评论
My proffesor gave use this script but i can not seem to understand what it means.
for i=1:3;
% Initialisation pour chaque obligation
t=sems(i); c=cpns(i); p=VO(i); g=tauxZC2(sems(i))/2;
% Definition de la fonction à minimiser
fun = @(x)(c/x*(1-1/(1+x)^t)+VN/(1+x)^t-p)^2;
% Minimisation avec taux spot comme premier guess
x0=g;
[xmin, fval]=fmincon(fun,x0);
Y(i)=xmin*2;
end
% OUTPUTS TRE en composition semestrielle
format long
Y
采纳的回答
更多回答(1 个)
It means minimize fun(x) over x for each set of fixed parameters t,c,p,VN. The initial guess for the minimization is g. The minimizing point is xmin and Y(i) will store twice the result, 2*xmin.
类别
在 帮助中心 和 File Exchange 中查找有关 Transportation Engineering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!