MATLAB: Failure in initial objective function evaluation. FMINCON cannot continue.

failurefminconnotenoughinput

Hi
I'm trying to optimize a system with the fmincon function and i'm using an erreurtest (ER = erreurtest(a,b,c,d,AP)) function that uses the first function ([tab_xy] = parcourstest (a,b,c,d,AP)) as well. When the fmincon function is disable, everything works out but when i'll trying to run it, I have a not enough input arguments in the line of the 2nd function.
Message error as shown:
Not enough input arguments.
Error in erreurtest (line 11)
[tab_xy] = parcourstest(a,b,c,d,AP);
Error in fmincon (line 536)
initVals.f = feval(funfcn{3},X,varargin{:});
Error in ProjetMEC729 (line 33)
fmincon(@erreurtest,x0,A,B,Aeq,Beq,lb,ub)
Caused by:
Failure in initial objective function evaluation. FMINCON cannot continue.