I have no idea what you’re doing. But you can start by carefully reading
and
http://cvxr.com/cvx/doc/