i have generated data using some other code and that is perfectly fine
the below written code is for estimating and i am getting error as Check for incorrect argument data type or missing argument in call to function 'matlabFunction'.
Error in newMLE (line 27) custLogFn = matlabFunction(custLog);
CODE
syms alphahat betahat thetahat i A;
Ayi = (1 + thetahat*y0); % ()=(1+);
rn1 = r(1:n1);
Term2 = (rn1+1).*(Ayi.^alphahat);
Byi = (1+ thetahat*(tau + betahat *(y1 -tau))); %{1+(+(−))};
rn2 = r(n1+1:m);
Term3 = (rn2+1).*(Byi.^alphahat);
q1=m*log(alphahat);
q2=m*log(thetahat);
q3=(m - n1)*log(betahat);
q4=(alphahat - 1)*log(sum(Ayi));
q5=sum(Term2);
q6=(alphahat-1)*log(sum(Byi)) ;
q7=sum(Term3);
custLog = @(y,alphahat,betahat,thetahat)(q1 + q2 +q3 + q4 - q5 + q6 - q7);
custLogFn = matlabFunction(custLog);
% alpha = 1.7; beta = 1.3; theta = 1.5;%Assumed values
[phat, pci] = mle(y, 'nloglf', custLogFn, 'start',[1.7, 1.3, 1.5]);