MATLAB: Using functions from previous MATLAB versions

2015blegacy functionreadtable

I recently upgraded from ver. 2014b to 2015b. The readtable function has changed in the process, and has resulted in me needing to change my code. I'd like to avoid changing this or doing a version check unless I have to. I still have 2014b installed; is it possible to just use the old version of readtable? When I open the file, it only gives me the comments for documentation purposes. Naturally, this question applies to all functions that one may have to do this with.

Best Answer

You would have to put that old version on the path before the current version, which would probably end up putting other things on the path first as well, and the errors tend to cascade. But it might not be too bad in this case; the relevant directory is
fullfile(matlabroot, 'toolbox', 'matlab', 'datatypes', '@table')
... which you would need to do relative to the old version in order if you were wanting to import it.
Related Question