powered by
Calculates the Frobenius norm of an array.
fnorm(X)
The square root of the sum of the squared elements of
X.
X
An array, a matrix, or a vector.
David Gerard.
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.
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)
Run the code above in your browser using DataLab