基于Matlab模拟 Ramsey-Cass-Koopmans 模型

简介: 基于Matlab模拟 Ramsey-Cass-Koopmans 模型

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法       神经网络预测       雷达通信      无线传感器        电力系统

信号处理              图像处理               路径规划       元胞自动机        无人机

⛄ 内容介绍

一,引言 对政府收支及其宏观经济效应的研究是公共财政理论的学科范畴,其核心是在以家庭(或代表性消费者),厂商和市场为考察对象的最优经济增长模型的基础上,引入了政府行为并分析其对宏观均衡的经济变量人均增长,资本与消费水平等的影响.在Solow模型中引入政府支出,得出了政府支出增加会减少均衡时的资本存量,从而减少实际人均均衡产出的结论.该结论与古典的IS-LM模型的结论完全相左,原因在于Solow模型的固定储蓄率假设导致了消费者不能选择储蓄行为.而Ramsey-Cass-Koopmans模型(以下简称PCK模型)将储蓄率作为内生变最,得出"政府支出的增加对均衡时的资本存量没有影响,仅仅把消费水平降低了相同的比例"的结论.该结论仍与实证研究以及传统的IS-LM模型的结论不符,解释力不足,原因可能是忽略了两种现象:一是人们在跨期选择时对未来的耐心程度即贴现因子具有内生性,即消费者行为对宏观经济均衡有影响;二是存在某些影响效用或生产的变量没有被引入效用函数或生产函数.

⛄ 部分代码

function varargout = ds2nfu(varargin)

% DS2NFU  Convert data space units into normalized figure units.

%

% [Xf, Yf] = DS2NFU(X, Y) converts X,Y coordinates from

% data space to normalized figure units, using the current axes.  This is

% useful as input for ANNOTATION.  

%

% POSf = DS2NFU(POS) converts 4-element position vector, POS from

% data space to normalized figure units, using the current axes.  The

% position vector has the form [Xo Yo Width Height], as defined here:

%

%      web(['jar:file:D:/Applications/MATLAB/R2006a/help/techdoc/' ...

%           'help.jar!/creating_plots/axes_pr4.html'], '-helpbrowser')

%

% [Xf, Yf] = DS2NFU(HAX, X, Y) converts X,Y coordinates from

% data space to normalized figure units, on specified axes HAX.  

%

% POSf = DS2NFU(HAX, POS) converts 4-element position vector, POS from

% data space to normalized figure units, using the current axes.

%

% Ex.

%       % Create some data

% t = 0:.1:4*pi;

% s = sin(t);

%

%       % Add an annotation requiring (x,y) coordinate vectors

% plot(t,s);ylim([-1.2 1.2])

% xa = [1.6 2]*pi;

% ya = [0 0];

% [xaf,yaf] = ds2nfu(xa,ya);

% annotation('arrow',xaf,yaf)

%

%       % Add an annotation requiring a position vector

% pose = [4*pi/2 .9 pi .2];

% posef = ds2nfu(pose);

% annotation('ellipse',posef)

%

%       % Add annotations on a figure with multiple axes

% figure;

% hAx1 = subplot(211);

% plot(t,s);ylim([-1.2 1.2])

% hAx2 = subplot(212);

% plot(t,-s);ylim([-1.2 1.2])

% [xaf,yaf] = ds2nfu(hAx1,xa,ya);

% annotation('arrow',xaf,yaf)

% pose = [4*pi/2 -1.1 pi .2];

% posef = ds2nfu(hAx2,pose);

% annotation('ellipse',posef)


% Michelle Hirsch

% mhirsch@mathworks.com

% Copyright 2006-2014 The MathWorks, Inc


%% Process inputs

error(nargchk(1, 3, nargin))


% Determine if axes handle is specified

if length(varargin{1})== 1 && ishandle(varargin{1}) && strcmp(get(varargin{1},'type'),'axes')

hAx = varargin{1};

varargin = varargin(2:end);

else

hAx = gca;

end;


errmsg = ['Invalid input.  Coordinates must be specified as 1 four-element \n' ...

'position vector or 2 equal length (x,y) vectors.'];


% Proceed with remaining inputs

if length(varargin)==1 % Must be 4 elt POS vector

pos = varargin{1};

if length(pos) ~=4,

error(errmsg);

end;

else

[x,y] = deal(varargin{:});

if length(x) ~= length(y)

error(errmsg)

end

end



%% Get limits

axun = get(hAx,'Units');

set(hAx,'Units','normalized');

axpos = get(hAx,'Position');

axlim = axis(hAx);


% Handle log scale axes

if strcmp(hAx.XScale,"log")

   axlim(1:2) = log10(axlim(1:2));

   x = log10(x);

end

if strcmp(hAx.YScale,"log")

   axlim(3:4) = log10(axlim(3:4));

   y = log10(y);

end


axwidth = diff(axlim(1:2));

axheight = diff(axlim(3:4));



%% Transform data

if exist('x','var')

varargout{1} = (x-axlim(1))*axpos(3)/axwidth + axpos(1);

varargout{2} = (y-axlim(3))*axpos(4)/axheight + axpos(2);

else

pos(1) = (pos(1)-axlim(1))/axwidth*axpos(3) + axpos(1);

pos(2) = (pos(2)-axlim(3))/axheight*axpos(4) + axpos(2);

pos(3) = pos(3)*axpos(3)/axwidth;

pos(4) = pos(4)*axpos(4)/axheight;

varargout{1} = pos;

end



%% Restore axes units

set(hAx,'Units',axun)

⛄ 运行结果

⛄ 参考文献

[1]吴立军, 曾繁华. 后危机时代中国经济增长的稳态路径研究--基于四万亿投资冲击下的偏离与均衡分析[J]. 当代财经, 2012(1):10.

⛄ 完整代码

❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料


相关文章
|
3月前
|
传感器 算法 安全
基于分布式模型预测控制DMPC的单向拓扑结构下异构车辆车队研究(Matlab代码实现)
基于分布式模型预测控制DMPC的单向拓扑结构下异构车辆车队研究(Matlab代码实现)
122 4
|
3月前
|
供应链 算法 新能源
高比例可再生能源电力系统的调峰成本量化与分摊模型(Matlab代码实现)
高比例可再生能源电力系统的调峰成本量化与分摊模型(Matlab代码实现)
|
3月前
|
机器学习/深度学习 边缘计算 算法
基于模型预测控制(MPC)的微电网调度优化的研究(Matlab代码实现)
基于模型预测控制(MPC)的微电网调度优化的研究(Matlab代码实现)
240 3
|
3月前
|
传感器 算法 安全
具有飞行约束的无人机MPC模型预测控制研究(Matlab代码实现)
具有飞行约束的无人机MPC模型预测控制研究(Matlab代码实现)
153 2
|
3月前
|
机器学习/深度学习 传感器 算法
【无人车路径跟踪】基于神经网络的数据驱动迭代学习控制(ILC)算法,用于具有未知模型和重复任务的非线性单输入单输出(SISO)离散时间系统的无人车的路径跟踪(Matlab代码实现)
【无人车路径跟踪】基于神经网络的数据驱动迭代学习控制(ILC)算法,用于具有未知模型和重复任务的非线性单输入单输出(SISO)离散时间系统的无人车的路径跟踪(Matlab代码实现)
214 2
|
3月前
|
传感器 机器学习/深度学习 编解码
【电缆】中压电缆局部放电的传输模型研究(Matlab代码实现)
【电缆】中压电缆局部放电的传输模型研究(Matlab代码实现)
131 3
|
3月前
|
算法 调度
【孤岛划分】分布式能源接入弹性配电网模型研究【IEEE33节点】(Matlab代码实现)
【孤岛划分】分布式能源接入弹性配电网模型研究【IEEE33节点】(Matlab代码实现)
416 10
|
3月前
|
机器学习/深度学习 数据采集 算法
基于VMD-CPA-KELM-IOWAl-CSA-LSSVM碳排放的混合预测模型研究(Matlab代码实现)
基于VMD-CPA-KELM-IOWAl-CSA-LSSVM碳排放的混合预测模型研究(Matlab代码实现)
148 5
|
3月前
|
算法 安全
【含储能及sop的多时段配网优化模型】基于柔性开断点(Soft Open Point)的主动配电网电压与无功功率协调控制方法研究(Matlab代码实现)
【含储能及sop的多时段配网优化模型】基于柔性开断点(Soft Open Point)的主动配电网电压与无功功率协调控制方法研究(Matlab代码实现)
111 8
|
3月前
|
机器学习/深度学习 并行计算 算法
【CPOBP-NSWOA】基于豪冠猪优化BP神经网络模型的多目标鲸鱼寻优算法研究(Matlab代码实现)
【CPOBP-NSWOA】基于豪冠猪优化BP神经网络模型的多目标鲸鱼寻优算法研究(Matlab代码实现)

热门文章

最新文章