%evc3.m: Procedure to return expected value function at %a particular (w,c) point in state space. CRRA U. %Hugo Benitez, Yale University, 1999. function[x]=evc3(cnw); global i intmeth beta sut periods itt bq wgrid; b=[wgrid(i)-cnw;1e-9]; a=max(b); ev_qw_myh=@ev_qw_my1; ufunc1h=@ufunc1; x=feval(ufunc1h,cnw)+beta*(1-sut(periods-itt))*feval(ev_qw_myh,cnw)+sut(periods-itt)*bq*feval(ufunc1h,a);