This page documents incompatibilities accross MATLAB versions. For each MATLAB release, it gives the main changes appearing in that release and that Dynare needs to handle. Note that all changes are not documented, please refer to the official release notes for a full list: [[http://www.mathworks.com/access/helpdesk_r13/help/base/relnotes/matlab/rn.html|for releases up to 6.5.1 (R13SP1)]], and [[http://www.mathworks.com/help/techdoc/rn/rn_intro.html|for releases since 7.0 (R14)]]. Dynare deals with these incompatibilities at three places: * in the configure script, via the various m4 macros for MATLAB * in the M-files, mainly through {{{matlab/dynare_config.m}}} * in the C++ source for MEX files, mainly through {{{dynmex.h}}}, {{{dynblas.h}}} and {{{dynlapack.h}}} in {{{mex/sources}}} <> = MATLAB 8.3 (R2014a) = * {{{mex}}} internals have changed * the name of some variables for optimization/linking flags has changed * the quoting rules for variable redefinition have changed * {{{flipdim}}} now obsolete (replace by {{{flip}}}) * New functions {{{isdiag, isbanded, issymmetric, ishermitian, istril, istriu, and bandwidth}}} for testing matrix structure * New function {{{sylvester}}} for solving the Sylvester equation * New option for {{{eig}}} function for computing left eigenvectors * New option for {{{rand, randi, and randn}}} functions for creating arrays of random numbers that match data type of an existing variable * Some improvements to {{{readtable}}} = MATLAB 8.2 (R2013b) = * Many changes in {{{repmat}}} calling syntax. Some issue warnings, some issue errors = MATLAB 8.1 (R2013a) = * Under GNU/Linux, option {{{-nojvm}}} is now incompatible with the usage of graphic handles * New functions: {{{strsplit}}}, {{{strjoin}}}, {{{flintmax}}}, * Error and warnings identifiers have changes (how they changed is not documented in the release notes…) * The behavior of {{{unique, union, intersect, setdiff, setxor}}}, and {{{ismember}}} has changed * Removed functions: {{{cholinc}}}, {{{luinc}}}, {{{setDefaultStream}}} and {{{getDefaultStream}}} of {{{RandStream}}} class = MATLAB 8.0 (R2012b) = * Syntax for abstract classes * {{{switch}}} constructs can behave differently when given enumerations * Classes can define a property attribute only once in a properties block * New functions: {{{ddensd}}}, {{{atan2d}}} * Interface changes for: {{{besselh, besseli, besselj, besselk, bessely, airy, psi}}} * Removed functions: {{{wklinfo, wklread, wklwrite}}} * Bit-wise operations now support signed integers * {{{xlsread}}} now reads data from XLSM, XLTX, and XLTM files and supports named ranges on all platforms * Multiple delimiter support in {{{textscan}}} function = MATLAB 7.14 (R2012a) = * New functions: {{{integral}}}, {{{integral2}}}, and {{{integral3}}} * Removed functions: {{{griddata3}}}, {{{delaunay3}}}, {{{tsearch}}}, {{{dsearch}}} = MATLAB 7.13 (R2011b) = * New class {{{griddedInterpolant}}} for interpolation * New options for {{{randperm}}}, {{{RandStream.randperm}}}, {{{qr}}} * Behavior changed for {{{meshgrid}}} and {{{ndgrid}}} * Removed function: {{{bessel}}} * New functions: {{{matfile}}}, {{{narginchk}}} (replaces {{{nargchk}}}) * Behavior changed for {{{nargoutchk}}} * Some error and warning identifiers have changed = MATLAB 7.12 (R2011a) = * New functions: {{{rng}}}, {{{ichol}}} * New options for {{{gammainc}}} * {{{qr}}} behaviour is reverted back to pre-R2010a behaviour (see R2010a releases notes) * Deprecated functions: {{{luinc}}}, {{{cholinc}}} * The old methods for random generators ({{{rand}}} or {{{randn}}} with {{{'seed'}}}, {{{'state'}}} or {{{'twister'}}} inputs) are deprecated in favor of {{{rng}}} * The {{{getDefaultStream}}} and {{{setDefaultStream}}} methods of {{{RandStream}}} class are deprecated in favor of {{{getGlobalStream}}} and {{{setGlobalStream}}} methods * New higher-level functions for HDF5 format, replacing older interface * Regular expressions in MATLAB now support successful zero-length matching = MATLAB 7.11 (R2010b) = * New functions: {{{isrow}}}, {{{iscolumn}}}, and {{{ismatrix}}} * Deprecated functions: {{{bessel}}}, {{{erfcore}}}, {{{intwarning}}}, {{{mmreader}}}, {{{wavplay}}}, {{{wavrecord}}}, {{{wk1finfo}}}, {{{wk1read}}}, {{{wk1write}}} * Core MATLAB functions do 64-bit integer arithmetic ({{{int64}}} and {{{uint64}}} classes) * Change in the behavior of {{{timeseries}}} objects * The {{{arrayfun}}} function now accepts an array of objects as an input. The output can also be a scalar object, as long as the {{{UniformOutput}}} flag is set to false. * In previous versions of MATLAB, calling {{{isequalwithequalnans}}} to compare identical arrays of objects that contain one or more NaN (Not a Number) values incorrectly returned false. Similarly, calling {{{isequal}}} to compare identical arrays of objects that contain !NaNs incorrectly returned true. In MATLAB version 7.11, these functions return the expected values ({{{true}}} for {{{isequalwithequalnans}}}, and {{{false}}} for {{{isequal}}}) when used to compare object arrays. * 4th return argument of {{{fileparts}}} removed * Options {{{-inline}}} and {{{-argcheck}}} of {{{mex}}} command removed = MATLAB 7.10 (R2010a) = * the following functions are now deprecated (but still work): {{{isstr, setstr, str2mat, strread, strvcat, textread}}}. See [[http://www.mathworks.com/access/helpdesk/help/techdoc/rn/br_bpq8-1.html#bsdnyvb-1]] for their replacements * in the output of the {{{qr}}} function, {{{R}}} now contains only real, nonnegative diagonal elements. Since the QR factorization is not unique, the answer is still correct. In previous releases, the diagonal of {{{R}}} could contain complex and negative elements. * if you have a function, such as the following, that returns a struct array: {{{ function structOut = getStruct structOut = struct('fieldA', 5, 'fieldB', 10); }}} it is no longer valid to access fields of the structure by directly dot indexing the function's return value, as shown here: {{{ getStruct.fieldA }}} Instead, you should first assign the returned structure to a variable, and then dot index the variable: {{{ s = getStruct; s.fieldA ans = 5 }}} = MATLAB 7.9 (R2009b) = * {{{maxNumCompThreads}}} now issues a warning, and will be removed in a future version * {{{~}}} notation added to denote function input/output arguments to be ignored = MATLAB 7.8 (R2009a) = * New command line option {{{-singleCompThread}}} for disabling automatic multithreading * New function: {{{quad2d}}} * Changed functions: {{{conv}}}, {{{conv2}}}, {{{convn}}} * On 64-bit platforms, BLAS and LAPACK now internally use 64-bit integers = MATLAB 7.7 (R2008b) = * Changed functions: {{{randn}}}, {{{randi}}} = MATLAB 7.6 (R2008a) = * Multithreading enabled by default * New functions: {{{clearvars}}}, {{{memory}}}, {{{onCleanup}}} = MATLAB 7.5 (R2007b) = * New functions: {{{quadgk}}}, {{{bvp5c}}}, {{{maxNumCompThreads}}} * Changed functions: {{{dmperm}}} * On 64-bit platforms, MATLAB arrays are no longer limited to 2^31^ elements. The limit in MATLAB 7.5 is 2^48^-1. * BLAS and LAPACK now in separate DLLs = MATLAB 7.4 (R2007a) = * New functions: {{{bsxfun}}}, {{{ilu}}}, {{{assert}}}, {{{ismac}}}, {{{verLessThan}}} * Changed functions: {{{rand}}}, {{{dir}}} * Divide By Zero and Log Of Zero Warnings Off By Default * Multithreading implemented, but not activated by default (but function {{{maxNumCompThreads}}} not yet implemented) * Introduction of MATLAB for Macintosh (Intel) * Default MEX extension changed for Macintosh (PowerPC) = MATLAB 7.3 (R2006b) = * New functions: {{{amd}}}, {{{bvpxtend}}}, {{{ldl}}} * Changed functions: {{{lu}}}, {{{chol}}}, {{{unique}}} * In MEX files, the following types are introduced: * {{{mwSize}}}: represents size values, such as array dimensions and number of elements * {{{mwIndex}}}: represents index values, such as indices into arrays On 32-bit machines, these types are simply aliases for {{{int}}}. On 64-bit machines, it depends on whether one gives the {{{-largeArrayDims}}} for the MEX command: * without {{{-largeArrayDims}}}, these types are {{{int}}} (and therefore 32 bits) * with {{{-largeArrayDims}}}, these types are {{{size_t}}}, which is an alias for {{{unsigned long}}} (and therefore 64 bits); this option is mandatory when using sparse arrays On 64-bit machines, it is therefore necessary to recompile MEX files which use sparse arrays. = MATLAB 7.2 (R2006a) = * New functions: {{{idivide}}}, {{{setenv}}} * On Linux, MATLAB now built with gcc 3.4: MEX files need to be rebuilt * Introduction of MATLAB for Windows 64-bit = MATLAB 7.1 (R14SP3) = * New functions: {{{hypot}}}, {{{mode}}}, {{{arrayfun}}}, {{{exifread}}}, {{{structfun}}}, {{{swapbytes}}}, {{{typecast}}} * Modified functions: {{{accumarray}}}, {{{odeset}}}, {{{rand}}}, {{{svd}}}, {{{cellfun}}}, {{{datestr}}}, {{{error}}}, {{{isfield}}}, {{{lasterror}}}, {{{rethrow}}}, {{{who}}}, {{{whos}}} * On Windows, the MEX command supports {{{-l}}} and {{{-L}}} options * On Windows, {{{.mexw32}}} is now the default extension for MEX files (instead of {{{.dll}}}) * New {{{mexext}}} shell script to recover the MEX extension in Makefiles * The import libraries for the MATLAB DLL files have been moved up a directory level and are no longer specific to the compiler version. The new location for these files is: $matlab/extern/lib/$arch/$vendor = MATLAB 7.0.4 (R14SP2) = = MATLAB 7.0.1 (R14SP1) = * New function: {{{ordeig}}} * Under Windows, this release cannot be used to compile the MEX files (BLAS/LAPACK developer libraries missing) = MATLAB 7.0 (R14) = * New format (v7) for MAT files * {{{Inf}}} and {{{NaN}}} accept dimension arguments for creating matrices * {{{eps}}} accepts an argument for computing relative precision * New functions: {{{addtodate}}}, {{{genvarname}}}, {{{intmax}}}, {{{intmin}}}, {{{intwarning}}}, {{{isfloat}}}, {{{isinteger}}}, {{{isscalar}}}, {{{isstrprop}}}, {{{isvector}}}, {{{mmfileinfo}}}, {{{recycle}}}, {{{restoredefaultpath}}}, {{{strtrim}}}, {{{textscan}}}, {{{xlswrite}}} * Changed functions: {{{xlsread}}}, {{{dlmwrite}}}, {{{xlsinfo}}} * Added nested functions * Functions handles can be called directly without {{{feval}}} * On Linux and Macintosh systems, all MEX-files that can throw errors need to be recompiled * Shared libraries previously residing in directory $MATLAB/extern/lib/$ARCH are now in $MATLAB/bin/$ARCH