Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB - Reached the maximum number of function evaluations

  1. Oct 19, 2011 #1
    Hi peoples,

    Anyone know or have any ideas how we can better write this code to eliminate this quad2d warning???

    Code (Text):
    num((i+1),(j+1)) = quad2d(@(x,y)inf_func(x,y,i,j),-pi,pi,-pi,pi);

    The function code is:
    Code (Text):
    function [y] = inf_func(x,y,m,n)
    y = ((1-cos(m.*x+n.*y))./(1-(1/6)*(4*cos(x).*cos(y)+2*cos(2.*y))));
    The warning given is:

    Any help is much appreciated!! Thanks
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted