I stumbled across this code which describes how you can construct smooth functions with compact support. Unfortunately, I'm not familiar with the programming language used so I can only guess what this code does.
Here's the the main code for convenience:
p = @(h) chebfun(1/h,[-h/2 h/2]);
f = p(1);
for k = 3:5
f = conv(f,p(2^-k));
end
and
[a,b] = domain(f);
f1 = chebfun({0, f, 0},[-1 a b 2]);
f2 = chebfun({0, newDomain(f,[a+1,b+1]), 0}, [-1 a+1 b+1 2]);
Can somebody please explain/write down the mathematically what is happening here? Related to this question I asked a few days ago.
Any help is greatly appreciated.
Note: I know how convolution (which is what is happening here in general, right?) works mathematically, I just can't "translate this code to math".