MATLAB: How can i use two variables with fmincon

fminconfunctionmatlab functionoptimization

I have a function like this:
TL=@(Y,H) TL_H(H)+TL_Y(Y,H)
When i run this code, i get an error message.
x0=[0,0];
A=[1,-1.29412]
b=1.01634
x=fmincon(TL,x0,A,b)
Not enough input arguments.
Error in
Error in (line 195)
x=fmincon(
Caused by:
Failure in initial objective function evaluation. FMINCON cannot continue.
How can i make avaible my function for using with fmincon?
Thanks

Best Answer

TL=@(X) TL_H(X(2))+TL_Y(X(1),X(2))
Best wishes
Torsten.