function F = sValueM ( M )
% sValueM - calculates spline values on the grid points
%      F = sValueM ( M )
%      M - 2D matrix with spline coeficients
%      F - matrix with spline values at the gridpoints of M, size(F)=size(M)

[m,n] = size(M);
BB = 1/36* [1 4 1]' * [1 4 1 ]; % Bernstein coeff. at s=t=0

F = sExtend(M);  

F = conv2( F, BB ); 
% convolution added 2 rows and 2 columns
F = F( (1:m)+2, (1:n)+2 );

return
