Closed TCWORLD closed 4 years ago
In export_fig v3.06 and newer, when using MATLAB pre-R2019b, the function getPrintImage in print2array.m will fail.
getPrintImage
print2array.m
This is because MATLAB changed the behaviour of the size function. The ability to pass in multiple dimensions was introduced in R2019b.
size
Simply changing line 319 of print2array.m from:
imgSize = size(imgData,[1,2]);
To this:
imgSize = size(imgData); imgSize = imgSize([1,2]);
Fixes the problem in older versions of MATLAB.
While I understand that supporting old versions of MATLAB can be tricky, it seems like its a worthwhile change as it should have no impact on performance so is a win win really.
Fixed
Thanks for the quick fix.
In export_fig v3.06 and newer, when using MATLAB pre-R2019b, the function
getPrintImage
inprint2array.m
will fail.This is because MATLAB changed the behaviour of the
size
function. The ability to pass in multiple dimensions was introduced in R2019b.Simply changing line 319 of
print2array.m
from:To this:
Fixes the problem in older versions of MATLAB.
While I understand that supporting old versions of MATLAB can be tricky, it seems like its a worthwhile change as it should have no impact on performance so is a win win really.