I am trying to find the proper way to add two functions. These are expressed as function handles because I need to use these functions as an fmincon parameter.
function1 = @(x) x(1)^2+5
function 2 = @(x) 2*x(2)
Sum would be: @(x) x(1)^2 + 2*x(2) + 5
I am confused by the documentation surrounding these types. I know there probably is a way to sum these handles or some other workaround, but I do not see it.
Thanks in advance.