I have a $200 \times 200$ matrix representing the values taken by a function over an equally spaced grid. I would like to perform derivatives on it.
I am interested in its gradient (i.e. its derivative in direction $x$ and its derivative in direction $y$) and in its Laplacian.
I work on the Matlab platform, where I use the built-in functions
del2 which work very well but their accuracy is limited by the fact that they make use of a small number of points.
Reading this Wikipedia page about Finite difference coefficients, one can understand that there are finite-difference schemes to perform numerical differentiation in a more accurate way. The price to pay to have an increased accuracy is of course to use more complex formulas, which include more points.
I would like to know if there is a library where there are functions capable of doing this job which -I repeat- is: computing the first-order and the second-order derivatives of a 2D matrix (representing the values of a not-explicitly-known function) with a user-defined accuracy.
It would be great if someone could suggest me Matlab libraries, but also C/C++ libraries could work, I guess.