Example 2.3
Calculation of Derivatives on a Non-uniform Mesh
Contents
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']
ans = -1.4722 -0.9000 -1.0986 -0.8000 -0.8673 -0.7000 -0.6931 -0.6000 -0.5493 -0.5000 -0.4236 -0.4000 -0.3095 -0.3000 -0.2027 -0.2000 -0.1003 -0.1000 0 0 0.1003 0.1000 0.2027 0.2000 0.3095 0.3000 0.4236 0.4000 0.5493 0.5000 0.6931 0.6000 0.8673 0.7000 1.0986 0.8000 1.4722 0.9000