File size: 246 Bytes
2a8276b
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
function v  = wfunc(c, s, EV, p)


[~, aprime] = savings(c, s, p);

v           = c.^(1 - p.sigma)/(1 - p.sigma) - ...
              p.phi^(1 + 1/p.gamma)/(1 + p.gamma)*c.^(-p.sigma*(1 + 1/p.gamma)) + p.beta*EV(aprime, s(:,2));