Combination of GMT5.3.4 and MATLAB2019a fail

I try to use GMT in the MATLAB.

I have MATLAB2019a and GMT 5.4.5 distribution in /opt/gmt.

I tried to test my gmt-mex installation which I saw in http://gmt.soest.hawaii.edu/projects/gmt-matlab-octave-api/wiki. 3. Test your gmt-mex installation.

gmt command worked, but command 2: gmt (‘psbasemap’, '-R0/10/0/15 -JM6i -P -Baf -BWSne+glightblue > map1.ps’ failed with this error

gmt (‘psbasemap’, ‘-R0/10/0/15 -JM6i -P -Baf -BWSne+glightblue > map1.ps’)

Invalid MEX-file ‘/Users/bae/Desktop/research/MATLAB function/opt/gmt/bin/gmtmex.mexmaci64’:

dlopen(/Users/bae/Desktop/research/MATLAB function/opt/gmt/bin/gmtmex.mexmaci64, 6): Library not

loaded: /opt/gmt/lib/libXgmt.5.4.5.dylib

Referenced from: /Users/bae/Desktop/research/MATLAB function/opt/gmt/bin/gmtmex.mexmaci64

Reason: image not found

Error in gmt (line 30)

[varargout{1:nargout}] = gmtmex (cmd, varargin{:});

Thanks