MATLAB: How to write objective function with variable plus constant for solving using intlinprog Ex. X1+4

intlinproglinear programminglinprogmixed integer programingOptimization Toolbox

How can I write objective function with variable plus constant for solving using intlinprog Ex. X1+4
Thank you for your time

Best Answer

There is no way to include a constant term in the objective function, but it would be meaningless to do so. Adding a constant term does not change the optimal solution, x.