MATLAB: MATLAB (2014a) crash while I use function polyfit() on macOS 10.13.3 High Sierra

crash

As title, it crashes when I run the example of polyfit.
x = (0: 0.1: 2.5)';
y = erf(x);
p = polyfit(x,y,6);
I was able to run it about one month before. MATLAB Version: 8.3.0.532 (R2014a) MATLAB License Number: •••••• Operating System: Mac OS X Version: 10.13.3 Build: 17D102 Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode

Best Answer

R2014a is not expected to work with High Sierra. It cannot be installed on High Sierra, and if inherited due to an ungrade, it is not expected that Java will function properly. It is not expected that Mathworks will patch R2014a to support High Sierra.
It is not possible for High Sierra to recognize the Java required by R2014a. El Capitan was the last version that reliably permitted that Java version. Sierra had a hidden System Preference that could be used to make the Java changes in theory but in practice that did not work.
Sierra made some security changes related to calling dynamic libraries, and High Sierra strictly enforces those changes. This can interfere with routine mathematics operations including calling the high performance mathematics libraries.
Related Question