If you are just trying to "solve" the generalized eigenvalue problem, use the form of MATLAB's eig with two input arguments eig(A,B). This does not involve CVX.
If you wish to "involve" CVX in the process, you can put cvx_begin before eig and cvx_end after eig. Then in some meaningless sense, you can say the problem was solved "in" CVX.
Do you have something specific you are trying to accomplish? Do you have a real problem you are trying to solve, or is this for a school assignment?