MatrixNormF_Full.F
c**********************************************************************
#include "author.inc"
c* $Id: MatrixNormF_Full.F,v 1.2 1995/07/30 17:51:12 turner Exp $
c*
c* Computes the Frobenius norm of a rectangular matrix.
c*
c* m n
c* --- ---
c* \ \ 2
c* Frobenius norm ==> sqrt / / a
c* --- --- ij
c* i=1 j=1
c*
c* WARNING: Note that JT_MatrixNormF_Full *must* be declared real in
c* routines that use it.
c*
c* <PARAMETER LIST>
c*
c* Input:
c* idim - leading dimension of a
c* nrows - number of rows in a
c* ncols - number of columns in a
c* a - matrix
c*
c* Output:
c* status - return status
c*
#include "copyright.inc"
c**********************************************************************
real function JT_MatrixNormF_Full (idim, nrows, ncols, a, status)
implicit none
c
c ... Input:
integer idim, nrows, ncols
real a(idim,ncols)
c
c ... Output:
integer status
c
c ... Local:
integer i, j
real zero
c
parameter (zero=0.0d0)
c
JT_MatrixNormF_Full = zero
do j=1,ncols
do i=1,nrows
JT_MatrixNormF_Full = JT_MatrixNormF_Full + a(i,j)*a(i,j)
enddo
enddo
JT_MatrixNormF_Full = SQRT(JT_MatrixNormF_Full)
c
status = 0
return
end