Maybe this is a basic question. Please help me with it. I define a function with a couple parameters.
y is chosen to minimize function fun. The outputs are y and fval. I would like to output some other values, for example, y*lambda. I know I can output y*lambda in the next step after fmincon. How to output y*lambda directly in the function or in optimization problem?