%% Example 2.3
% Calculation of Derivatives on a Non-uniform Mesh

%% Setup
N = 18;
J = 0:N;
y = .9*(2*J/N - 1);
x = atanh(y);

%% Plot
figure(1),clf
plot(y,x,'*-')
axis([min(y) max(y) min(x) max(x)])
xlabel('\xi','FontSize',14)
ylabel('x','FontSize',14)

%% Numbers
[x' y']