greenRegularizedWithTensionRBF

PURPOSE ^

Regularized Green spline with tension, as defined in:

SYNOPSIS ^

function fx = greenRegularizedWithTensionRBF(r, e)

DESCRIPTION ^

 Regularized Green spline with tension, as defined in:
 Mitásová, H., Mitás, L., 1993. Interpolation by regularized spline with
 tension: I. Theory and implementation. Mathematical Geology 25
 (6), 641–655.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function fx = greenRegularizedWithTensionRBF(r, e)
0002 % Regularized Green spline with tension, as defined in:
0003 % Mitásová, H., Mitás, L., 1993. Interpolation by regularized spline with
0004 % tension: I. Theory and implementation. Mathematical Geology 25
0005 % (6), 641–655.
0006 
0007 Ce = 0.5772156649015328606065120900824; % Value of the euler constant. To get it according to your computer precision: vpa(eulergamma);
0008 e = (e^2)/4;
0009 z = r.*r.*e;
0010 fx = -log(z)-expint(z)-Ce;
0011 fx(r==0) = 0; % Fix singularity
0012 
0013 % fx = zeros(size(r));
0014 %
0015 % x = e .* r .* r;
0016 % z = x;
0017 %
0018 % fx = log(x) + Ce;
0019 % En = 0.2677737343 +  8.6347608925 .* x;
0020 % Ed = 3.9584869228 + 21.0996530827 .* x;
0021 % x = x.*x;
0022 % En = En + 18.0590169730 * x;
0023 % Ed = Ed + 25.6329561486 * x;
0024 % x = x.*x;
0025 % En = En + 8.5733287401 * x;
0026 % Ed = Ed + 9.5733223454 * x;
0027 % x = x.*x;
0028 % En = En+x;
0029 % Ed = Ed+x;
0030 % fx = fx + (En ./ Ed) ./ (z .* exp(z));
0031 %
0032 % maskSmall = x <= 1.0;
0033 % if (any(maskSmall(:)))
0034 %     fxS = 0.99999193 .* x;
0035 %     x = x.*x;
0036 %     fxS = fxS - 0.24991055 .* x;
0037 %     x = x.*x;
0038 %     fxS = fxS + 0.05519968 .* x;
0039 %     x = x.*x;
0040 %     fxS = fxS - 0.00976004 .* x;
0041 %     x = x.*x;
0042 %     fxS = fxS + 0.00107857 .* x;
0043 %     fx(maskSmall) = fxS(maskSmall);
0044 % end
0045 % fx(r==0) = 0;
0046 
0047 end

Generated on Thu 10-Dec-2020 17:34:27 by m2html © 2005