%
function [spli, fspli]=D_smoothsplaP(z,Par,m,rho) 

%z --values of the input signal at the points {n=0:2^m:N/2^m-1}, N=2^j
%2^m--span of the spline
%Par -- order of solution spline, should be even number
%rho -regularization parameter
%when rho=0, the spline interpolates the signal 'z'
%calculation of the smoothing/interpolating discrete spline values 'spli'at integer points {n=0:N-1}

lz=length(z);
N=2^m*lz;
fz=fft(z);
[~, fbsp, ~, U2]=per_dbspP(N,m,Par);
 
n=0:N-1;
   si=sin(pi*n/lz);
   W=(2^(1-m)*si).^Par;
  U2=repmat(U2,1,2^m); 
   fz=repmat(fz,1,2^m);
    spli=real(ifft(fz./(rho*W+U2).*fbsp));
 

fspli=abs(fft(spli));
 %
 % Copyright (c) 2013. Valery A. Zheludev




