public void testMatrixFunction() {
FiniteDifferencesDifferentiator differentiator =
new FiniteDifferencesDifferentiator(7, 0.01);
UnivariateDifferentiableMatrixFunction f =
differentiator.differentiate(new UnivariateMatrixFunction() {
public double[][] value(double x) {
return new double[][] {
{ FastMath.cos(x), FastMath.sin(x) },
{ FastMath.cosh(x), FastMath.sinh(x) }