clear; clc;

f = @(x) x .^ 2 + 1;
g = myDiff(f);
g(10)

f = @sin;
g = myDiff(f);
g(pi / 2)