全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
1704 0
2014-10-18
%% use MATLAB set variables
global vlast beta delta theta k0 kt
hold off
hold on
%% set initial conditions
vlast=zeros(1,100)
k0=0.06:0.06:6
beta=0.98
delta=0.1
theta=0.36
numits=240
%% begin the recursive calculations
for k=1:numits
    for j=1:100
        kt=j*0.06
        % find the maximum of value function
        ktp1=fminbnd(@valfun,0.01,6.2)
        v(j)=-valfun(ktp1)
        kt1(j)=ktp1
    end
    if k/48==round(k/48)
        % plot the steps in finding the value function
        plot(k0,v)
        drawnow
    end
hold off
    % plot the final policy function
    plot(k0,kt1)
怎么将bellman方程写入? v(kt)=ln(kt-k(t+1)+(1-delta)kt)+beta*v(k(t+1))_

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群