0

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.

  • 1
    @whuber: Maybe moving this to SO will be more appropriate. (I would vote to close as belong to another SE website if possible) – usεr11852 Apr 07 '16 at 17:21
  • Please provide a [mcve] and the *full* error message. – sco1 Apr 07 '16 at 17:26
  • Possible duplicate of [Using fminsearch to perform distribution fitting](http://stackoverflow.com/questions/35951934/using-fminsearch-to-perform-distribution-fitting) – rozsasarpi Apr 07 '16 at 17:55

0 Answers0