|
|
John Gibson and James P Henson |
|
''Getting the most from MATLAB: ditching canned routines and embracing coder'' |
( 2016, Vol. 36 No.4 ) |
|
|
This paper demonstrates the efficiency gains that can be realized by replacing canned routine calls within MATLAB with user-generated versions that simplify the underlying computations. Once canned routines have been replaced, we integrate C++ executables (or MEX files) using MATLAB's Coder to automatically convert our MATLAB code. We demonstrate these efficiency gains by computing the stationary equilibria and associated transition path for an economy with incomplete insurance markets following a change in government debt policy. The combined process of replacing calls to canned routines and integrating MEX files reduces our runtime from just over 24 hours to approximately 16 minutes. |
|
|
Keywords: MATLAB, C++, MATLAB Coder, Incomplete Markets,
Stationary Distribution, Transitional Dynamics |
JEL: C6 - Mathematical Methods and Programming: General E2 - Macroeconomics: Consumption, Saving, Production, Employment, and Investment: General (includes Measurement and Data) |
|
Manuscript Received : Oct 21 2016 | | Manuscript Accepted : Dec 21 2016 |
|