title: How can I solve an Unit Commitment by calling CPLEX with the method of Mix Integer Quadratic Programming
body: <p>The function in CPLEX can only solve up to a quadratic problem. And if a cost function is quadratic, and it should be multiplied with a commitment vector, then it becomes a third order equation. 
  Many papers have explained how to transfer a quadratic function to a stairwise function, and the mathematical way is easy to understand. However I don't know how to put the transferred functions into the cplexmiqp() in Cplex cause the coefficient matrix is hard to determine. 
  Could anybody tell me how to implement this question into cplex function and, if possible, a sample program will be of great help! Thanks!</p>