基于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电子书和数学建模资料


相关文章
|
1月前
|
传感器 算法 计算机视觉
基于肤色模型和中值滤波的手部检测算法FPGA实现,包括tb测试文件和MATLAB辅助验证
该内容是关于一个基于肤色模型和中值滤波的手部检测算法的描述,包括算法的运行效果图和所使用的软件版本(matlab2022a, vivado2019.2)。算法分为肤色分割和中值滤波两步,其中肤色模型在YCbCr色彩空间定义,中值滤波用于去除噪声。提供了一段核心程序代码,用于处理图像数据并在FPGA上实现。最终,检测结果输出到"hand.txt"文件。
|
3月前
|
存储
【模型预测控制】Matlab自带MPC Designer工具(自用)
【模型预测控制】Matlab自带MPC Designer工具(自用)
|
3月前
|
Perl
【MFAC】基于全格式动态线性化的无模型自适应控制(Matlab代码)
【MFAC】基于全格式动态线性化的无模型自适应控制(Matlab代码)
|
7月前
|
算法 语音技术
基于MFCC特征提取和HMM模型的语音合成算法matlab仿真
基于MFCC特征提取和HMM模型的语音合成算法matlab仿真
|
7天前
|
移动开发
MATLAB用GARCH模型对股票市场收益率时间序列波动的拟合与预测
MATLAB用GARCH模型对股票市场收益率时间序列波动的拟合与预测
12 0
|
8天前
|
数据可视化
matlab用高斯曲线拟合模型分析疫情数据
matlab用高斯曲线拟合模型分析疫情数据
13 0
|
8天前
|
机器学习/深度学习 存储 前端开发
Matlab建立SVM,KNN和朴素贝叶斯模型分类绘制ROC曲线
Matlab建立SVM,KNN和朴素贝叶斯模型分类绘制ROC曲线
35 5
|
9天前
|
算法
matlab贝叶斯隐马尔可夫hmm模型实现
matlab贝叶斯隐马尔可夫hmm模型实现
25 0
|
9天前
|
算法
matlab中的隐马尔可夫模型(HMM)实现
matlab中的隐马尔可夫模型(HMM)实现
|
3月前
【MFAC】基于紧格式动态线性化的无模型自适应控制(Matlab代码)
【MFAC】基于紧格式动态线性化的无模型自适应控制(Matlab代码)

热门文章

最新文章