hypergeom (kummer function) mupadmex error

조회 수: 1 (최근 30일)
Daniel
Daniel 2013년 7월 7일
Hi guys,
I calibrate a model and use kummer hypergeometric function to calculate the option price. The problem is that when I use hypergeom function of Matlab, it returns error for some values:
Error using mupadmex
Internal error with symbolic engine. Please quit and restart MATLAB.
Error in sym/hypergeom (line 1084)
hSym = mupadmex('symobj::map', args{1}.s, 'symobj::hypergeom',...
Error in hypergeom (line 35)
h = double(hypergeom(n,d,sym(z)));
Error in momentum (line 3)
x=hypergeom(p+nu+1,nu+1,alpha/2);
Error in Putprice (line 47)
Def=1-exp(-integral(bfunc,0,T))*(x^2/tau)^(1/(2*abs(beta)))*momentum(-1/(2*abs(beta)),delta,x^2/tau);
Error in LSQDiff (line 12)
Diff(:,i)= mktprice(:,i)-Putprice(S,K,T(i),x(1),x(2));
When I use kummer function, that was written by other authors and uploaded to the mathworks, the function is working. But for some other values it hangs.
I cannot combine these two functions and donot know the source of the error. Can anybody help with this mupadmex error?
Thanks.
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 7월 7일
Do you have an estimate for the order of magnitude the hypergeom would reach? I have seen signs that mupad might exit like that if it tried to calculate a number much larger than it's limits (something like 10^10000)
Daniel
Daniel 2013년 7월 7일
편집: Daniel 2013년 7월 7일
It starts from 8.5340e+132 and converges to 597.9375 Now I'm using genHyper function written by Ben Barrowes
It returns the following mistake:
error in ipremax--did not find maximum exponent
Error using genHyper>ipremax (line 1721)
stop encountered in original fortran code

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Special Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by