Unable to use CVX due to some license issue!

I was using CVX.

I had reinstall MATLAB.

I also reinstalled CVX, now I get the following from cvx_setup:


CVX: Software for Disciplined Convex Programming (c)2014 CVX Research
Version 2.2, Build 1148 (62bfcca) Tue Jan 28 00:51:35 2020

Installation info:
Path: /Users/admin/Documents/cvx
MATLAB version: 24.2 (R2024b)
OS: Mac OS X aarch64 version 15.1.1
Java version: 11.0.25
Verfying CVX directory contents:
WARNING: The following files/directories are missing:
/Users/admin/Documents/cvx/sedumi/.travis.yml
These omissions may prevent CVX from operating properly.
ERROR: one or more MEX files for this platform are missing.
These files end in the suffix “.mexmaca64”. CVX will not operate
without these files. Please visit
Downloading CVX | CVX Research, Inc.
And download a distribution targeted for your platform.
Preferences:
Path: /Users/admin/Library/Application Support/MathWorks/MATLAB/cvx_prefs.mat
UNEXPECTED ERROR: ------------------------------
Unrecognized function or variable ‘command_str’.
Error in cvx_license
Error in cvx_license
Error in cvx_version (line 309)
cvx_license( args{:} );
^^^^^^^^^^^^^^^^^^^^^^
Error in cvx_setup (line 20)
cvx_version( ‘-install’, varargin{:} );
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
------------------------------------------------
Please report this error to support, and include entire output of
CVX_SETUP in your support request.

Install CVX 2.2.2 from GitHub - cvxr/CVX: A MATLAB system for disciplined convex programming .

The only license required is the solver license for any non-free solver you call (Gurobi or Mosek).

It also has native support for Mac M1.

Thanks!

2.2.2 seems much easier to install.

However, earlier I was using MOSEK also, but now it seems MOSEK is not there by default (from earlier set-up)

For example when I try to run

cvx_begin %sdp
cvx_solver Mosek
variable alphaa

I get the error

Error using cvx_solver (line 46)
Unknown, unusable, or missing solver: Mosek

Error in LinSchoberOpt (line 12)
cvx_solver Mosek
^^^^^^^^^^
Error in Center_Fed_SLA_40 (line 23)
Wide_Opt = LinSchoberOpt (abs(U(:,1)), Wide_Try, RIS, [-0.3827 0.3827]);


CVX: Software for Disciplined Convex Programming (c)2014 CVX Research
Version 2.2, Build 9 (a0a77590) Tue Apr 23 19:28:09 2024

Installation info:
Path: /Users/admin/Documents/cvx
MATLAB version: 24.2 (R2024b)
OS: Mac OS X aarch64 version 15.1.1
Java version: 11.0.25
Verfying CVX directory contents:
No missing files.
Preferences:
Path: /Users/admin/Library/Application Support/MathWorks/MATLAB/cvx_prefs.mat

Setting CVX paths…done.
Saving updated path…done.
Searching for solvers…5 shims found.
3 solvers initialized (* = default):
Gurobi 11.03 /Library/gurobi1103/macos_universal2/matlab

  • SDPT3 4.0 {cvx}/sdpt3
    SeDuMi 1.02, {cvx}/sedumi
    2 solvers skipped:
    GLPK
    Could not find a GLPK installation.
    Mosek unknown
    Could not find a MOSEK MEX file.
    Saving updated preferences…done.
    Testing with a simple model…done!

To change the default solver, type “cvx_solver <solver_name>”.
To save this change for future sessions, type “cvx_save_prefs”.
Please consult the users’ guide for more information.

There aren’t any commercial solvers included, which is good, because they were old versions anyway.

You just install your own Mosek and let cvx_setup detect it.

https://docs.mosek.com/latest/toolbox/install-interface.html

I installed MOSEK, but then the cvx does not detect it!

Most likely you installed it incorrectly, or didn’t add it to the path.

Please follow all steps in 4 Installation — MOSEK Optimization Toolbox for MATLAB 10.2.8, including the test with mosekdiag, use the troubleshooting info to correct any errors, and when you are sure Mosek works stand-alone then run cvx_setup.

Indeed, the path was wrong! All fine now, thanks!