I want to solve the following regression problem:
min ||G1* x+G2* x.* x-y||
(G1,G2 matrices; y column vector) for x. I get error messages with the second term
("Illegal affine combination of convex and/or concave terms detected.)
I’ve tried
G2* square(x), G2*power(2,x)
all with the same result.

That is essentially a nonlinear least squares (norm) problem. hence not convex and not suitable for CVX (presuming x really is the optimization variable).

Thank you. To check that I understand correctly: there will be some matrices
G1, G2 such that the problem is convex, but because this does not
hold for all G1,G2 the CVX syntax does not support the model formulation.