powered by
Calculate the p-norm of any function between given limits.
generalPNorm(fun, p, lower, upper)
function to calculate the p-norm of.
the pth norm to calculate
lower bound for the integral
upper bound for the integral
Returns a numeric value for the p norm of a function evaluated between given limits.
The p-norm of a function \(f\) is given by, $$(\int_S |f|^p d\mu)^{1/p}$$ where \(S\) is the function support.
The p-norm is calculated numerically using the integrate function and therefore results are approximate only.
integrate
# NOT RUN { generalPNorm(Exponential$new()$pdf,2,0,10) # }
Run the code above in your browser using DataLab