EconPapers    
Economics at your fingertips  
 

Getting the most from MATLAB: ditching canned routines and embracing coder

John Gibson () and James Henson

Economics Bulletin, 2016, vol. 36, issue 4, 2519-2525

Abstract: 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 (search for similar items in EconPapers)
JEL-codes: C6 E2 (search for similar items in EconPapers)
Date: 2016-12-21
References: View references in EconPapers View complete reference list from CitEc
Citations:

Downloads: (external link)
http://www.accessecon.com/Pubs/EB/2016/Volume36/EB-16-V36-I4-P243.pdf (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:ebl:ecbull:eb-16-00719

Access Statistics for this article

More articles in Economics Bulletin from AccessEcon
Bibliographic data for series maintained by John P. Conley ().

 
Page updated 2025-03-31
Handle: RePEc:ebl:ecbull:eb-16-00719