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

Bug fix (wrong indexing in present value evaluation).

(cherry picked from commit f687b531)
parent e8936c39
Branches
Tags
No related merge requests found
Pipeline #6459 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