'Singularity Likely' in Quad

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

  1. Michelle

    Michelle Guest

    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
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.