An error when using gurobi in cvx

I have installed gurobi in cvx, and using cvx_setup to show that the gurobi exists, but there are some errors when running my code, does anyone know how to solve it? Thanks.

Calling Gurobi 9.00: 840 variables, 440 equality constraints


Status: Error
Optimal value (cvx_optval): NaN

错误使用 cvx_end (line 267)
model.quadcon must be a struct array with fields q, and rhs

出错 text_discrete (line 23)
cvx_end

I think there are or were some bugs in the CVX-Gurobi interface. Try upgrading to at least Gurobi 9.1 (and you could also try the just released 9.5), and make sure you’re using the latest version of CVX 2.2 (do not use the bug-laden CVX 3.0beta). You can also try reinstalling CVX. Does it work on any problem, for instance, a problem having a feasible optimal solution?

If those suggestions don’t work, try filing a bug report.per http://cvxr.com/cvx/doc/support.html#bug-reports .