Discussion in 'MATLAB' started by Michelle, Jan 20, 2010.

1. ### MichelleGuest

I've writted a function m-file that takes z as an argument and then uses quad to find the integral of 1+cos(x.^2) from 0 to z.
After z=50, matlab returns the warning: "Maximum function count exceeded; singularity likely," but it also gives an answer
I tested z=100 in matlab and came up with 102.1137. I also found an online definite integral calculator and used it on the same integral and it gave me 100.625
I'm wondering if matlab is giving me an inaccurate answer because of something involving this warning, and if so, how can I fix it?

Michelle, Jan 20, 2010