In [1]:
using BasisFunctions
BA = BasisFunctions
using FrameFun
FE = FrameFun
using DomainSets
using Plots
using LinearAlgebra
gr()
Out[1]:
Platform implents matrix_A(...) and matrix_Zt(...) routines
In [2]:
function myFun(f::Function,P::Platform,i)
AZS = AZSolver(matrix_A(P,i),matrix_Zt(P,i))
F = DictFun(primal(P,i),AZS*f)
end
Out[2]:
In [3]:
P = BA.fourier_platform()
Out[3]:
works for periodic functions
In [ ]:
f = x->cos(4*pi*x)
F = myFun(f,P,8)
plot(F)
but not for general functions
In [ ]:
f = x->exp(x)
F = myFun(f,P,8)
plot(F)
Singular value profile
In [ ]:
plot(svdvals(matrix(matrix_A(P,5)*matrix_Zt(P,5))),ylims=(-0.1,1.1))
In [ ]:
D = 0..0.5
P2a = BasisFunctions.fourier_platform(oversampling=4)
P2 = FrameFun.extension_frame_platform(P2a,D)
In [ ]:
f = x->exp(x)
F2 = myFun(f,P2,8)
plot(F2)
Singular value profile
In [ ]:
plot(svdvals(matrix(matrix_A(P2,5)*matrix_Zt(P2,5))),ylims=(-0.1,1.1))
Square root type singularity
In [ ]:
WSP = FrameFun.WeightedSumPlatform([x->sqrt(x),x->1],P2)
In [ ]:
f = x->sqrt(x)*(1-x)-exp(x)
FSP = myFun(f,WSP,8)
plot(FSP,f)
This is much more accurate than the regular extension platform
In [ ]:
FSPb = myFun(f,P2,8)
plot(FSP,f)
plot!(FSPb,f)
Singular value profile
In [ ]:
plot(svdvals(matrix(matrix_A(WSP,7)*matrix_Zt(WSP,7))),ylims=(-0.1,4.1))
In [ ]: