1
<?xml version="1.0" encoding="UTF-8"?>
3
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4
* Copyright (C) 2008 - INRIA
6
* This file must be used under the terms of the CeCILL.
7
* This source file is licensed as described in the file COPYING, which
8
* you should have received as part of this distribution. The terms
9
* are also available at
10
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="norm" xml:lang="en">
15
<refname>norm</refname>
16
<refpurpose>matrix norm</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>[y]=norm(x [,flag])</synopsis>
23
<title>Arguments</title>
28
<para>real or complex vector or matrix (full or sparse
36
<para>string (type of norm) (default value =2)</para>
50
<title>Description</title>
51
<para>For matrices</para>
57
or <literal>norm(x,2)</literal> is the largest singular value
58
of <literal>x</literal> (<literal>max(svd(x))</literal>).
63
<term>norm(x,1)</term>
66
The l_1 norm <literal>x</literal> (the largest column sum :
67
<literal>max(sum(abs(x),'r'))</literal> ).
72
<term>norm(x,'inf'),norm(x,%inf)</term>
75
The infinity norm of <literal>x</literal> (the largest row sum
76
: <literal>max(sum(abs(x),'c'))</literal> ).
81
<term>norm(x,'fro')</term>
83
<para>Frobenius norm i.e.
84
<literal>sqrt(sum(diag(x'*x)))</literal>.
89
<para>For vectors</para>
92
<term>norm(v,p)</term>
95
The l_p norm (<literal>sum(v(i)^p))^(1/p)</literal> .
100
<term>norm(v), norm(v,2)</term>
108
<term>norm(v,'inf')</term>
111
<literal>max(abs(v(i)))</literal>.
118
<title>Examples</title>
119
<programlisting role="example"><![CDATA[
126
A=sparse([1 0 0 33 -1])
130
<refsection role="see also">
131
<title>See Also</title>
132
<simplelist type="inline">
134
<link linkend="h_norm">h_norm</link>
137
<link linkend="dhnorm">dhnorm</link>
140
<link linkend="h2norm">h2norm</link>
143
<link linkend="abs">abs</link>
146
<link linkend="svd">svd</link>