\section{NORM Norm Calculation}

\subsection{Usage}

Calculates the norm of a matrix.  There are two ways to
use the \verb|norm| function.  The general syntax is
\begin{verbatim}
   y = norm(A,p)
\end{verbatim}
where \verb|A| is the matrix to analyze, and \verb|p| is the
type norm to compute.  The following choices of \verb|p|
are supported
\begin{itemize}
\item  \verb|p = 1| returns the 1-norm, or the max column sum of A

\item  \verb|p = 2| returns the 2-norm (largest singular value of A)

\item  \verb|p = inf| returns the infinity norm, or the max row sum of A

\item  \verb|p = 'fro'| returns the Frobenius-norm (vector Euclidean norm, or RMS value)

\end{itemize}
For a vector, the regular norm calculations are performed:
\begin{itemize}
\item  \verb|1 <= p < inf| returns \verb|sum(abs(A).^p)^(1/p)|

\item  \verb|p| unspecified returns \verb|norm(A,2)|

\item  \verb|p = inf| returns max(abs(A))

\item  \verb|p = -inf| returns min(abs(A))

\end{itemize}
\subsection{Examples}

Here are the various norms calculated for a sample matrix
\begin{verbatim}
--> A = float(rand(3,4))

A = 

    0.2751    0.5250    0.0532    0.8315 
    0.9886    0.7171    0.6396    0.5145 
    0.5634    0.9679    0.7133    0.0706 

--> norm(A,1)

ans = 

    2.2099 

--> norm(A,2)

ans = 

    2.0674 

--> norm(A,inf)

ans = 

    2.8597 

--> norm(A,'fro')

ans = 

    2.2313 


\end{verbatim}
Next, we calculate some vector norms.
\begin{verbatim}
--> A = float(rand(4,1))

A = 

    0.0288 
    0.6311 
    0.4853 
    0.6145 

--> norm(A,1)

ans = 

    1.7596 

--> norm(A,2)

ans = 

    1.0061 

--> norm(A,7)

ans = 

    0.6962 

--> norm(A,inf)

ans = 

    0.6311 

--> norm(A,-inf)

ans = 

 2.8751e-02 


\end{verbatim}
