Hi peoples,(adsbygoogle = window.adsbygoogle || []).push({});

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:

The warning given 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))));

end

Any help is much appreciated!! Thanks > In quad2d at 242

Warning: Reached the maximum number of function evaluations (2000). The result

fails the global error test.

**Physics Forums - The Fusion of Science and Community**

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

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - MATLAB Reached maximum | Date |
---|---|

Matlab Coding angular spectrum of waves in a fluid | Today at 7:30 AM |

How to program this in Matlab | Feb 28, 2018 |

Matlab Making a short test for self-adjointness | Feb 23, 2018 |

FindMaximum function in Mathematica | Feb 10, 2016 |

**Physics Forums - The Fusion of Science and Community**