errors fixed in 2nd order derivatives
parent
bd26eb2251
commit
434157f611
|
@ -52,8 +52,8 @@ end
|
||||||
|
|
||||||
if nargout == 3
|
if nargout == 3
|
||||||
if length(a)==1
|
if length(a)==1
|
||||||
D2ldens(idx) = -(a-1)./(x(idx)-aa).^2 + (b-1)./(bb-x(idx)).^2 ;
|
D2ldens(idx) = -(a-1)./(x(idx)-aa).^2 - (b-1)./(bb-x(idx)).^2 ;
|
||||||
else
|
else
|
||||||
D2ldens(idx) = -(a(idx)-1)./(x(idx)-aa(idx)).^2 + (b(idx)-1)./(bb(idx)-x(idx)).^2;
|
D2ldens(idx) = -(a(idx)-1)./(x(idx)-aa(idx)).^2 - (b(idx)-1)./(bb(idx)-x(idx)).^2;
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -53,9 +53,9 @@ end
|
||||||
|
|
||||||
if nargout == 3
|
if nargout == 3
|
||||||
if length(s)==1
|
if length(s)==1
|
||||||
D2ldens(idx) = (nu+1)./(x(idx).^2) - 3*s.*x(idx).^2./(x(idx).^4) ;
|
D2ldens(idx) = (nu+1)./(x(idx).^2) - 3*s(idx)./(x(idx).^4) ;
|
||||||
else
|
else
|
||||||
D2ldens(idx) = (nu(idx)+1)./(x(idx).^2) - 3*s.*x(idx).^2./(x(idx).^4) ;
|
D2ldens(idx) = (nu(idx)+1)./(x(idx).^2) - 3*s(idx)./(x(idx).^4) ;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue