numerical solution for a problem with closed-form solution
显示 更早的评论
I am trying to solve the following problem numerically: An agnet lives for 10 periods, starts with wealth = 20, there is a constant 3% rate on return on assets, utlity is CRRA with risk aversion coefficient 1.2, intertemporal parameter is 0.9709. I want to get the optinal consumption path. I can solve the problem analitycally and therefore I know the solution is a constant consumption stream of 2.2763. However, I cannot get an accurate solution when solving it numerically with Matlab. IS this the best Matlab can do or am I doing something wrong?
2 个评论
Walter Roberson
2011-4-1
If you post what you have done, people could examine it to see if there is anything wrong with the code.
John D'Errico
2023-1-10
That you did not get a solution that makes you happy need not be a reflection that MATLAB could not do a better job of solving it, but that you may have written the solution in some inadequate way. MATLAB is just a tool. The workman who blames the tools for poor work may be putting the blame in the wrong place.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Common Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!