Function approximation using Convolution Orthogonality#
Created on Tue Aug 27 08:33:23 2024
@author: ppranjiv
- func_apprx_conv.legen_scaled(x, degree)#
- func_apprx_conv.mass(degree)#
Compute the Mass matirx
Parameters#
- degreeint
max. degree for the polynomial
Returns#
- Marray
Mass matrix of shape (degree x degree)
- func_apprx_conv.exp(x, a1, degree)#
Reconsturct the function f (x) = SUM_n a_n P_n,
- where,
P_n is shifted Legendre polynomails over the interval [0,1] and, a_n are the coeffcients.
Parameters#
- xarray
x in [0, 1]
- a1array
coeffiencts for Galerkin projection
- degreeint
max. degree for the polynomial
Returns#
- fxarray
function values at x in [0,1]
- func_apprx_conv.func1(x)#
Test function
Parameters#
- xarray
x in [0, 1]
Returns#
- fxarray
function values at x in [0,1]
- func_apprx_conv.conv_f_Q(degree)#
Computes the outer-convolution from [0,1] of
- g1 = f * P_n,
- where,
P_n is shifted Legendre polynomial and f is the function
Parameters#
- degreeint
degree for the polynomial
Returns#
- g1float
convolution in [0,1]
- func_apprx_conv.main(degree)#