MATLAB: Compiling failing using MAtlab 2019b

compilerMATLABmatlab 2018bMATLAB Compilermatlab2019bupgrade

Hi,
I am trying to compile an algorithm using MAtlab 2019b but I am reaciving this error:
Error ID:
---------
'MATLAB:mpath:PathAlterationNotSupported'
--------------
Error Details:
--------------
Error using matlabpath Modifying the search path is not supported by MATLAB Compiler. Remove functions that modify the search path from your MATLAB code. To make files visible to your deployed application, add the parent folder to your MATLAB session.
Error in path (line 109)
Error in addpath (line 86)
$proc = Start-Process -FilePath "C:\Program Files\MATLAB\R2019b\bin\matlab.exe" -ArgumentList "-automation -nosplash -nodesktop -wait -r "echo ; cd $VDPSDK\Framework\Integration; setVDPSDKPath $VDPSDK; disp(iAnalytics.VDPSDK.getSingleton.getRevision); createExecutable; exit" -logfile $logfile" -Credential $credential -PassThru;
The algorithm was compiled with no issue with Matlab 2018b but it is failing using Matlab 2019b.
Can you tell me any solution?

Best Answer

The solution is to stick with R2018b.
Modifying the matlab path using addpath is not likely to be supported at any point in the future.
If you are modifying the path at runtime to change MATLAB's idea of which of two routines with the same name are to be invoked, then that is not a great programming practice. I have seen that method used to implement "plug-ins" in some frameworks, but it is still kind of icky.
Related Question