How to write the fractional program in MATLAB cvx tool?

Maximize, f(x)=(c*x+d)/(x+1);
subject to
0 <=(e*x+g)/(x) <=1;

h*x+k=0

where, c,e, and x are n-dimension vector. g and d are scalar.

How to write the fractional program in MATLAB cvx tool?

Maximize, f(x)=(c*x+d)/(x+1);
subject to
0 <=(e*x+g)/(x) <=1;

h*x+k=0

where, c,e, and x are n-dimension vector. g and d are scalar.

Read section 4.3.2 of http://stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf .

Dear sir,

I am transfer from fraction program to linear program a/c to Read section 4.3.2 of http://stanford.edu/~boyd/cvxbook/bv_cvxbook.pdf . But program doesn’t give the correct solution. Please, help me how to write the program in cvx tool.

Thanking you in advance

I’m not a specialist in that area. I provided you a good reference. If you study it, and work the relevant problems in the book, including the earlier material on linear fractional-functions and transformations (search for “fractional” in the book pdf), you should be able to formulate problems of that type in CVX. You need to learn and understand the math. Once you do, programming it in CVX will be very easy.

Here is a video by the co-author of the book for a free online course which was offered in 2014 https://www.class-central.com/mooc/1577/stanford-openedx-cvx101-convex-optimization . There is more information on the course at .https://lagunita.stanford.edu/courses/Engineering/CVX101/Winter2014/f0e5ca452f9a437c83af75626d196df0/ . I think there may be similar courses offered now at various places - perhaps you should take one.

I will also say that if you don’t have a strong enough background, it’s hard to jump into the middle of the book, such as the section on Linear-Fractional Programming,without reading and understanding the earlier material in the book - in this case, certainly to include other material on linear-fractional functions and transformations. If you are good enough in math or optimization, you probably can jump into the middle of the book. If not, it might not work out well to do so.

This is not convex unless you can guarantee that x>0, which you have not specified in your model. I echo Mark’s suggestion: the problems you are having are not CVX specific, and as such are not really appropriate to this forum. Consider Math StackExchange, OR-Exchange, etc.