cvxr / CVX

A MATLAB system for disciplined convex programming
Other
226 stars 83 forks source link

Undefined function 'cvx' for input arguments of type 'struct'. #18

Closed sajadkhosravani1 closed 1 year ago

sajadkhosravani1 commented 1 year ago

Hello My attempts to install CVX on both linux & windows have encountered an error through cvx_setup.m either using the versions from http://cvxr.com/cvx/beta/ or from github. The similar response from the script is as follows. This response is from linux edition: http://web.cvxr.com/cvx/beta/cvx-a64.tar.gz.

---------------------------------------------------------------------------
Setting CVX paths...already set!
Searching for solvers...7 shims found.
2 solvers initialized (* = default):
 *  SDPT3    4.0        {cvx}/sdpt3
    SeDuMi   1.34       {cvx}/sedumi
3 solvers not found:
    ECOS     https://github.com/ifa-ethz/ecos    
    GLPK     http://glpkmex.sourceforge.net/    
    SCS      https://github.com/cvxgrp/scs    
2 solvers require a CVX Professional license:
    Gurobi              {cvx}/gurobi/a64
    Mosek    unknown    {cvx}/mosek/a64

    UNEXPECTED ERROR: --------------------------------------------
    Undefined function 'cvx' for input arguments of type 'struct'.
    Error in cvx_global (line 53)
    cvx___.obj         = cvx( struct( 'size_', [0,1], 'basis_',
        sparse(1,0), 'dual_', '', 'id_', 0 ) );
    Error in cvx_setup (line 222)
        cvx_global;
    --------------------------------------------------------------
Please report this error to support, and include entire output of
CVX_SETUP in your support request.

It seems that the function "cvx" is expected to be at the address cvx/builtins/@cvx/cvx.m but there is no such file in any official version of the CVX.

Thank you in advance for helping me out.

sajadkhosravani1 commented 1 year ago

The repository had been cloned within a Matlab package directory (starting with +), and the installation procedure went alright by simply putting the repository in the root directory of the project.