Watch this Author's files
Thanks for contribution
This algorithm replaces the upper integral bound inf with 20, which is assumed as a fairly large number. It seems to work with 20,50,100 as I tried.
But if you try 150, 200, 500, 1000 and so on, it seems to fail.
good
Contact us at files@mathworks.com