I’m new to cvx. I’m trying to execute an example from “Disciplined Convex Programming” slides by Boyd and Grant.
cvx begin variable Sigma(n,n) symmetric maximize ( w'Sigma*w ) subject to Sigma == semidefinite(n); % Sigma is positive semidefinite Sigma >= L; Sigma <= U; cvx end
But I’m getting this error:
Error using sparse sparse(A) does not accept char inputs A. Use sparse(double(A)) instead. Error in cvx (line 28) v = class( struct( 'size_', size( s ), 'basis_', sparse( s(:).' ), 'dual_', '', 'dof_', , 'slow_', nnz( isinf( s ) | isnan( s ) ) ~= 0 ), 'cvx', cvxobj );
>> whos w Name Size Bytes Class Attributes w 4x1 32 double >> whos L Name Size Bytes Class Attributes L 4x4 128 double >> whos U Name Size Bytes Class Attributes U 4x4 128 double >> whos n Name Size Bytes Class Attributes n 1x1 8 double
so everything is double. Could you please help me out? Thank you.
PS/Off topic.: What is this forum engine? I really like it.