Mercurial > hg > octave-nkf
diff scripts/linear-algebra/norm.m @ 1479:f362012138a7
[project @ 1995-09-26 07:55:43 by jwe]
author | jwe |
---|---|
date | Tue, 26 Sep 1995 07:57:49 +0000 |
parents | d23a476a93b8 |
children | 84bd88b8acee |
line wrap: on
line diff
--- a/scripts/linear-algebra/norm.m +++ b/scripts/linear-algebra/norm.m @@ -85,6 +85,9 @@ if (isstr (p)) if (strcmp (p, "fro")) retval = sqrt (sum (diag (x' * x))); + elseif (strcmp (p, "inf")) + xp = x'; + retval = max (sum (abs (real (xp)) + abs (imag (xp)))); else error ("norm: unrecognized norm"); endif