Frobenius Norm of Two Matrices

Share:

Description

Computation of the Frobenius norm of two matrices as the sum of the squared differences between these matrices.

Usage

1
fnorm(mat1, mat2)

Arguments

mat1

numerical matrix

mat2

numerical matrix

Value

Return value is the Frobenius norm.

Note

Both input matrices must have the same dimensions.

Author(s)

Franziska Hoffgaard

Examples

1
2
3
a<-matrix(runif(15, 1, 7), 5, 3)
b<-matrix(rnorm(15, 1, 7), 5, 3)
fn<-fnorm(a, b)