I unable to run my program.Please help me...

조회 수: 1 (최근 30일)
Sakthivel K M
Sakthivel K M 2017년 9월 7일
댓글: José-Luis 2017년 9월 7일
y=[repmat(0,1,7840),repmat(1,1,1317),repmat(2,1,239),repmat(3,1,42),repmat(4,1,14),repmat(5,1,4),repmat(6,1,4),repmat(1,1,1)]
n=length(y)
k=tabulate(y)
x=y(1)
syms f j
f =@(x,r,d,j) (factorial(x)/(factorial(x-j)*factorial(j)))*((-1)^j)*((d+r+j+1)/((d+r+j)^2))
s1=symsum(f,j,0,x)
custlogpdf =@(x,d,r) log(factorial(r+x-1)/(factorial(x)*factorial(r-1)))+ log(s1);
phat = mle(x,'logpdf',custlogpdf, 'start',[0.4,5,2,1])
  댓글 수: 1
José-Luis
José-Luis 2017년 9월 7일
편집: José-Luis 2017년 9월 7일
"Error: File: imreader.m Line: 8 Column: 81 Unbalanced or unexpected parenthesis or bracket."
What part of the error message gives you trouble? Check your parentheses.

댓글을 달려면 로그인하십시오.

답변 (1개)

José-Luis
José-Luis 2017년 9월 7일
custlogpdf =@(x,d,r) log(factorial(r+x-1)/(factorial(x)*factorial(r-1))+ log(s1));
  댓글 수: 2
Sakthivel K M
Sakthivel K M 2017년 9월 7일
Thanks for your help... I corrected the bracket but my error is in last line of my program...(i.e.,)
phat = mle(x,'logpdf',custlogpdf, 'start',[0.4,5,2,1])
José-Luis
José-Luis 2017년 9월 7일
I dont have the symbolic math toolbox.
What's the error message?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by