BUG: "Attempt to execute SCRIPT norms as a function"

Hi All,

I am having a problem running CVX with norms in my objective function or constraints. CVX works fine when solving most problems, but whenever I try to incorporate a norm in any way, I get the error “Attempt to execute SCRIPT norms as a function:”. I tried to create the simplest example possible:

close all;
clear all;
clc;

cvx_begin
variable x
minimize norm(x,1)
cvx_end

The code should return some optimal value essentially zero (running the code on a peer’s computer returned +2.37836e-09), but instead the following is returned in the console:

Attempt to execute SCRIPT norms as a function:
/Users/***/***/***/***/norms.m

Error in cvx/svec (line 17)
        z = y .* norms( xR, nrm, 2 );

Error in cvx/norm (line 46)
    x = svec( x, p );

Error in minimize (line 14)
    x = evalin( 'caller', sprintf( '%s ', varargin{:} ) );

Error in cvxproblem (line 6)
minimize norm(x,1)

Nobody I asked, including experienced MATLAB users, has been able to explain the error and I simply do not know how to fix it. I am running CVX version 3 (29 June 2007) and MATLAB R2015a on a 2015 Macbook Pro. If anyone has any tips or fixes, I would be forever grateful!

Thanks,
Kevin

I’m going to guess you have a file called norms.m in your MATLAB path that’s conflicting with the one in CVX. Or, you have a corrupt CVX installation, so CVX’s copy of this file is wrong.

1 Like

Ah, you were right about the conflicting norms.m in the MATLAB path, thank you very much!