MA 5324 Problem 5.1

2D cardinal basis functions

Contents

construction

phi = @(r) exp(-r.^2);
ep = 5;
N = 9; X1 = linspace(0,1,N)'; [XX,YY] = meshgrid(X1,X1); X = [XX(:) YY(:)];
D = phi(ep*distm(X,X));
M = 200; X1_e = linspace(0,1,M)'; [XX_e,YY_e] = meshgrid(X1_e,X1_e); X_e = [XX_e(:) YY_e(:)];
D_e = phi(ep*distm(X_e,X));

plot

k =  50; e = zeros(N^2,1); e(k) = 1;
u = D\e;
y_e = D_e*u;
surf(XX_e,YY_e,reshape(y_e,M,M));
shading interp; camlight; lighting gouraud