See Set Larger Finite Differences. Also, check that your function returns different values for different inputs.
Alan Weiss
MATLAB mathematical toolbox documentation
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!