Skip to content
Snippets Groups Projects
Verified Commit f687b531 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Bug fix (wrong indexing in present value evaluation).

parent eb6af4af
Branches
Tags
No related merge requests found
Pipeline #6457 passed
......@@ -179,8 +179,8 @@ else
% Define the discounted companion matrix
DiscountedCompanionMatrix = discountfactor*CompanionMatrix;
% First compute the parameters implied by the discounted sum from h=0 to h=horizon(1)-1
tmp1 = eye(n);
for h=1:horizon(1)
tmp1 = zeros(n);
for h=0:horizon(1)-1
tmp1 = tmp1 + mpower(DiscountedCompanionMatrix, h);
end
tmp1 = alpha*tmp1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment