~ubuntu-branches/ubuntu/raring/scilab/raring-proposed

« back to all changes in this revision

Viewing changes to modules/elementary_functions/help/en_US/norm.xml

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-30 14:42:38 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20120830144238-c1y2og7dbm7m9nig
Tags: 5.4.0-beta-3-1~exp1
* New upstream release
* Update the scirenderer dep
* Get ride of libjhdf5-java dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
<!--
3
 
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4
 
 * Copyright (C) 2008 - INRIA
5
 
 * 
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
11
 
 *
12
 
 -->
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">
14
 
  <refnamediv>
15
 
    <refname>norm</refname>
16
 
    <refpurpose>matrix norm</refpurpose>
17
 
  </refnamediv>
18
 
  <refsynopsisdiv>
19
 
    <title>Calling Sequence</title>
20
 
    <synopsis>[y]=norm(x [,flag])</synopsis>
21
 
  </refsynopsisdiv>
22
 
  <refsection>
23
 
    <title>Arguments</title>
24
 
    <variablelist>
25
 
      <varlistentry>
26
 
        <term>x</term>
27
 
        <listitem>
28
 
          <para>real or complex vector or matrix (full or sparse
29
 
            storage)
30
 
          </para>
31
 
        </listitem>
32
 
      </varlistentry>
33
 
      <varlistentry>
34
 
        <term>flag</term>
35
 
        <listitem>
36
 
          <para>string (type of norm) (default value =2)</para>
37
 
        </listitem>
38
 
      </varlistentry>
39
 
      <varlistentry>
40
 
        <term>y</term>
41
 
        <listitem>
42
 
          <para>
43
 
            norm
44
 
          </para>
45
 
        </listitem>
46
 
      </varlistentry>
47
 
    </variablelist>
48
 
  </refsection>
49
 
  <refsection>
50
 
    <title>Description</title>
51
 
    <para>For matrices</para>
52
 
    <variablelist>
53
 
      <varlistentry>
54
 
        <term>norm(x)</term>
55
 
        <listitem>
56
 
          <para>
57
 
            or <literal>norm(x,2)</literal> is the largest singular value
58
 
            of <literal>x</literal> (<literal>max(svd(x))</literal>).
59
 
          </para>
60
 
        </listitem>
61
 
      </varlistentry>
62
 
      <varlistentry>
63
 
        <term>norm(x,1)</term>
64
 
        <listitem>
65
 
          <para>
66
 
            The l_1 norm <literal>x</literal> (the largest column sum :
67
 
            <literal>max(sum(abs(x),'r'))</literal> ).
68
 
          </para>
69
 
        </listitem>
70
 
      </varlistentry>
71
 
      <varlistentry>
72
 
        <term>norm(x,'inf'),norm(x,%inf)</term>
73
 
        <listitem>
74
 
          <para>
75
 
            The infinity norm of <literal>x</literal> (the largest row sum
76
 
            : <literal>max(sum(abs(x),'c'))</literal> ).
77
 
          </para>
78
 
        </listitem>
79
 
      </varlistentry>
80
 
      <varlistentry>
81
 
        <term>norm(x,'fro')</term>
82
 
        <listitem>
83
 
          <para>Frobenius norm i.e.
84
 
            <literal>sqrt(sum(diag(x'*x)))</literal>.
85
 
          </para>
86
 
        </listitem>
87
 
      </varlistentry>
88
 
    </variablelist>
89
 
    <para>For vectors</para>
90
 
    <variablelist>
91
 
      <varlistentry>
92
 
        <term>norm(v,p)</term>
93
 
        <listitem>
94
 
          <para>
95
 
            The l_p norm (<literal>sum(v(i)^p))^(1/p)</literal> .
96
 
          </para>
97
 
        </listitem>
98
 
      </varlistentry>
99
 
      <varlistentry>
100
 
        <term>norm(v), norm(v,2)</term>
101
 
        <listitem>
102
 
          <para>
103
 
            The l_2 norm
104
 
          </para>
105
 
        </listitem>
106
 
      </varlistentry>
107
 
      <varlistentry>
108
 
        <term>norm(v,'inf')</term>
109
 
        <listitem>
110
 
          <para>
111
 
            <literal>max(abs(v(i)))</literal>.
112
 
          </para>
113
 
        </listitem>
114
 
      </varlistentry>
115
 
    </variablelist>
116
 
  </refsection>
117
 
  <refsection>
118
 
    <title>Examples</title>
119
 
    <programlisting role="example"><![CDATA[ 
120
 
A=[1,2,3];
121
 
norm(A,1)
122
 
norm(A,'inf')
123
 
A=[1,2;3,4]
124
 
max(svd(A))-norm(A)
125
 
 
126
 
A=sparse([1 0 0 33 -1])
127
 
norm(A)
128
 
 ]]></programlisting>
129
 
  </refsection>
130
 
  <refsection role="see also">
131
 
    <title>See Also</title>
132
 
    <simplelist type="inline">
133
 
      <member>
134
 
        <link linkend="h_norm">h_norm</link>
135
 
      </member>
136
 
      <member>
137
 
        <link linkend="dhnorm">dhnorm</link>
138
 
      </member>
139
 
      <member>
140
 
        <link linkend="h2norm">h2norm</link>
141
 
      </member>
142
 
      <member>
143
 
        <link linkend="abs">abs</link>
144
 
      </member>
145
 
      <member>
146
 
        <link linkend="svd">svd</link>
147
 
      </member>
148
 
    </simplelist>
149
 
  </refsection>
150
 
</refentry>