I have a custom pdf that has 3 parameters (X,n,k), where X represents the data (vector) and n,k are two scalars. I want to calculate the mle for this custom pdf, so I wrote this in matlab:
custpdf=@(X,n,k)custompdf(length(X),n,k)
phat =mle(X,'pdf',custpdf,'start',[n0,k0])
But I get this error:
Too many input arguments.
I searched for an answer, but couldn't find one. What am I doing wrong here? Thank you guys.