Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Consider formalization of this trick for solving for the KFE #21

@jlperla

Description

@jlperla

From Ben:
Simply fix one element of the vector f, then solve the linear system (which is no longer singular) and the renormalize f afterwards. See e.g. this code snippet from http://www.princeton.edu/~moll/HACTproject/huggett_partialeq.m

AT = A';
b = zeros(2*I,1);

%need to fix one value, otherwise matrix is singular
i_fix = 1;
b(i_fix)=.1;
row = [zeros(1,i_fix-1),1,zeros(1,2*I-i_fix)];
AT(i_fix,:) = row;

%Solve linear system
gg = AT\b;
g_sum = gg'*ones(2*I,1)*da;
gg = gg./g_sum;

The question will be whether this approach can be generalized in a nonlinear setup.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions