I get this error when I run my code with Matlab 2018, the same code works fine with Matlab 2017, can you please let me know how to solve this issue?

Invalid MEX-file ‘/Users/aminghazanfari/Documents/MATLAB/cvx/lib/cvx_bcompress_mex.mexmaci64’:
dlopen(/Users/aminghazanfari/Documents/MATLAB/cvx/lib/cvx_bcompress_mex.mexmaci64, 6): Library not loaded:
@loader_path/libmex.dylib
Referenced from: /Users/aminghazanfari/Documents/MATLAB/cvx/lib/cvx_bcompress_mex.mexmaci64
Reason: image not found.

Did you try consulting MATLAB. It looks like MATLAB issue not CVX.