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:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="range">
15
<refname>range</refname>
16
<refpurpose> range (span) of A^k</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>[X,dim]=range(A,k)</synopsis>
23
<title>Arguments</title>
28
<para>real square matrix</para>
40
<para>orthonormal real matrix</para>
46
<para>integer (dimension of subspace)</para>
52
<title>Description</title>
54
Computation of Range <literal>A^k</literal> ; the first dim rows of <literal>X</literal> span the
55
range of <literal>A^k</literal>. The last rows of <literal>X</literal> span the
56
orthogonal complement of the range. <literal>X*X'</literal> is the Identity matrix
60
<title>Examples</title>
61
<programlisting role="example"><![CDATA[
62
A=rand(4,2)*rand(2,4); // 4 column vectors, 2 independent.
63
[X,dim]=range(A,1);dim // compute the range
65
y1=A*rand(4,1); //a vector which is in the range of A
66
y2=rand(4,1); //a vector which is not in the range of A
67
norm(X(dim+1:$,:)*y1) //the last entries are zeros, y1 is in the range of A
68
norm(X(dim+1:$,:)*y2) //the last entries are not zeros
70
I=X(1:dim,:)' //I is a basis of the range
71
coeffs=X(1:dim,:)*y1 // components of y1 relative to the I basis
73
norm(I*coeffs-y1) //check
76
<refsection role="see also">
77
<title>See Also</title>
78
<simplelist type="inline">
80
<link linkend="fullrfk">fullrfk</link>
83
<link linkend="rowcomp">rowcomp</link>
88
<title>Used Functions</title>
90
The <literal>range</literal> function is based on the <link linkend="rowcomp">rowcomp</link> function
91
which uses the <link linkend="svd">svd</link> decomposition.