You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: splint.m
    path of file: ./repos/fecgsyn/subfunctions/data-generation/libs/fieldtrip/private
    
    the code of the file until where you have to start completion: function [V2, L2, L1] = splint(elc1, V1, elc2, order, degree, lambda)

% SPLINT computes the spherical spline interpolation and the surface laplacian
% of an EEG potential distribution
% 
% Use as
%   [V2, L2, L1] = splint(elc1, V1, elc2)
% where
%   elc1    electrode positions where potential is known
%   elc2    electrode positions where potential is
    
function implements equations (3) and (5b) of Perrin 1989 
% for simultaneous computation of multiple values
% also implemented as MEX file, but without the adaptive N
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [gx, hx] = gh(x, M, N)
% M = 4;          % constant in denominator, set in ft_scalpcurrentdensity
% N is the number of terms for series expansion, set in ft_scalpcurrentdensity
% N=9 works fine for 32 electrodes, but for 128 electrodes it should be larger
% if max(size(x))<=32
%   N = 9;
% elseif max(size(x))<=64
%   N = 14;
% elseif max(size(x))<=128
%   N = 20;
% else
%   N = 32;
% end