Cannot perform the operation: {real affine} ./ {real affine}?!

The argument of f, not to mention f itself, and therefore g and h1, are violating CVX’s rules. Try reading Why isn’t CVX accepting my model? READ THIS FIRST! and re-reading the CVX User’s Guide.