fnorm {tensr} | R Documentation |
Frobenius norm of an array.
Description
Calculates the Frobenius norm of an array.
Usage
fnorm(X)
Arguments
X |
An array, a matrix, or a vector. |
Details
The Frobenius norm of an array is the square root of the sum of its squared elements. This function works for vector and matrix arguments as well.
Value
The square root of the sum of the squared elements of
X
.
Author(s)
David Gerard.
Examples
X <- c(1:8)
Y <- matrix(1:8, nrow = 2)
Z <- array(1:8, dim = c(2, 2, 2))
fnorm(X)
fnorm(Y)
fnorm(Z)
[Package tensr version 1.0.1 Index]