Hello, I tried to run this code on MATLAB but this error message usually appears and I don't know what is the problem


for k=1:5

cvx_begin quiet
    variable x(n,n);
             minimize( norm(Library_training-Library_training*x) );  
    subject to
             Library_constraint*x == Library_constraint;
             if k>1
% Use thresholding
fprintf('\n Iteration %d\n',k)
smallinds = (abs(X)<lambda);


Things to try.

Try running in a new MATLAB session.
Try a different solver
Try reinstalling CVX in a new MATLAB session
Try rebooting

Thanks, I will try and I hope it works

I tried another solver after rebooting and the problem did not solve

What is the output of

CVX: Software for Disciplined Convex Programming (c)2014 CVX Research
Version 3.0beta, Build 1183 (dda2109) Sun Dec 17 18:58:10 2017

Installation info:
Path: C:\cvx
MATLAB version: 9.13 (R2022b)
OS: Windows 10 amd64 version 10.0
Java version: 1.8.0_202
Verfying CVX directory contents:
No missing files.
Loading preferences:
Global: C:\cvx\cvx_prefs.mat … not found.
Local: C:\Users\Mohamed Omar\AppData\Roaming\MathWorks\MATLAB\cvx_prefs.mat … loaded.
License host:
Username: Mohamed Omar
Host ID: ecb1d73e73ca (eth1)
Host ID: ecb1d73e73cb (eth2)
Installed license:
Organization: Mansoura university
Contact: Mohamed Omar (mohamed_omar@mans.edu.eg)
License type: academic
Named user: Mohamed Omar
Host ID: ecb1d73e73ca
Expiration: 2024-02-18 (335 days remaining)

Remove all CVX 3.0 beta directories from the MATLAB path. Then start a new MATLAB session, and install CVX 2.2.

Do not use CVX 3.0beta. It is riddled with bugs, which very likely will never be fixed.