Function: normlp
Section: linear_algebra
C-Name: gnormlp
Prototype: GDGp
Help: normlp(x,{p}): Lp-norm of x; sup norm if p is omitted.
Doc:
 $L^p$-norm of $x$; sup norm if $p$ is omitted. More precisely,
 if $x$ is a scalar, \kbd{normlp}$(x, p)$ is defined to be \kbd{abs}$(x)$.
 If $x$ is a polynomial, a (row or column) vector or a matrix:

 \item  if $p$ is omitted, \kbd{normlp($x$)} is defined recursively as
 $\max_i \kbd{normlp}(x_i))$, where $(x_i)$ run through the components of~$x$.
 In particular, this yields the usual sup norm if $x$ is a polynomial or
 vector with complex components.

 \item otherwise, \kbd{normlp($x$, $p$)} is defined recursively as $(\sum_i
 \kbd{normlp}^p(x_i,p))^{1/p}$. In particular, this yields the usual $(\sum
 |x_i|^p)^{1/p}$ if $x$ is a polynomial or vector with complex components.

 \bprog
 ? v = [1,-2,3]; normlp(v)      \\ vector
 %1 = 3
 ? M = [1,-2;-3,4]; normlp(M)   \\ matrix
 %2 = 4
 ? T = (1+I) + I*x^2; normlp(T)
 %3 = 1.4142135623730950488016887242096980786
 ? normlp([[1,2], [3,4], 5, 6])   \\ recursively defined
 %4 = 6

 ? normlp(v, 1)
 %5 = 6
 ? normlp(M, 1)
 %6 = 10
 ? normlp(T, 1)
 %7 = 2.4142135623730950488016887242096980786
 @eprog
