powered by
Scales each curve to have Lp norm equal to 1.
normalize(fdataobj, p = 2)
A normalized 'fdata' object where each curve has unit norm.
An object of class 'fdata'.
The order of the norm (default 2 for L2 norm).
fd <- fdata(matrix(rnorm(100), 10, 10), argvals = seq(0, 1, length.out = 10)) fd_norm <- normalize(fd) norm(fd_norm) # All values should be 1
Run the code above in your browser using DataLab