1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--Converted with LaTeX2HTML 97.1 (release) (July 13th, 1997)
by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippman, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>SLA_SVD - Singular Value Decomposition</TITLE>
<META NAME="description" CONTENT="SLA_SVD - Singular Value Decomposition">
<META NAME="keywords" CONTENT="sun67">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
<LINK REL="STYLESHEET" HREF="sun67.css">
<LINK REL="next" HREF="node181.html">
<LINK REL="previous" HREF="node179.html">
<LINK REL="up" HREF="node13.html">
<LINK REL="next" HREF="node181.html">
</HEAD>
<BODY >
<BR> <HR>
<A NAME="tex2html2226" HREF="node181.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
<A NAME="tex2html2224" HREF="node13.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
<A NAME="tex2html2218" HREF="node179.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
SRC="contents_motif.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2227" HREF="node181.html">SLA_SVDCOV - Covariance Matrix from SVD</A>
<BR>
<B>Up:</B> <A NAME="tex2html2225" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
<BR>
<B> Previous:</B> <A NAME="tex2html2219" HREF="node179.html">SLA_SUPGAL - Supergalactic to Galactic</A>
<BR> <HR> <P>
<P><!--End of Navigation Panel-->
<H2><A NAME="SECTION0004167000000000000000">SLA_SVD - Singular Value Decomposition</A>
<A NAME="xref_SLA_SVD"> </A><A NAME="SLA_SVD"> </A>
</H2>
<DL>
<DT><STRONG>ACTION:</STRONG>
<DD>Singular value decomposition.
This routine expresses a given matrix <B>A</B> as the product of
three matrices <B>U</B>, <B>W</B>, <B>V</B><SUP><I>T</I></SUP>:
<PRE><TT>
<B>A</B> = <B>U</B> <IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img72.gif"
ALT="$\cdot$"> <B>W</B> <IMG WIDTH="7" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
SRC="img72.gif"
ALT="$\cdot$"> <B>V</B><SUP><I>T</I></SUP>
</TT></PRE>
where:
<PRE><TT>
<B>A</B> is any <I>m</I> (rows) <IMG WIDTH="25" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img226.gif"
ALT="$\times n$"> (columns) matrix, where <IMG WIDTH="48" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img227.gif"
ALT="$m \geq n$">
<B>U</B> is an <IMG WIDTH="46" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img228.gif"
ALT="$m \times n$"> column-orthogonal matrix
<B>W</B> is an <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img73.gif"
ALT="$n \times n$"> diagonal matrix with <IMG WIDTH="54" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img229.gif"
ALT="$w_{ii} \geq 0$">
<B>V</B><SUP><I>T</I></SUP> is the transpose of an <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img73.gif"
ALT="$n \times n$"> orthogonal matrix
</TT></PRE>
<P> <DT><STRONG>CALL:</STRONG>
<DD><TT>CALL sla_SVD (M, N, MP, NP, A, W, V, WORK, JSTAT)</TT>
<P> </DL>
<P> <DL>
<DT><STRONG>GIVEN:</STRONG>
<DD>
<BR>
<TABLE CELLPADDING=3>
<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>M,N</EM></TD>
<TH ALIGN="LEFT"><B>I</B></TH>
<TH ALIGN="LEFT" NOWRAP><I>m</I>, <I>n</I>, the numbers of rows and columns in matrix <B>A</B></TH>
</TR>
<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>MP,NP</EM></TD>
<TD ALIGN="LEFT"><B>I</B></TD>
<TD ALIGN="LEFT" NOWRAP>physical dimensions of array containing matrix <B>A</B></TD>
</TR>
<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
<TD ALIGN="LEFT"><B>D(MP,NP)</B></TD>
<TD ALIGN="LEFT" NOWRAP>array containing <IMG WIDTH="46" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img228.gif"
ALT="$m \times n$"> matrix <B>A</B></TD>
</TR>
</TABLE></DL>
<P> <DL>
<DT><STRONG>RETURNED:</STRONG>
<DD>
<BR>
<TABLE CELLPADDING=3>
<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>A</EM></TD>
<TH ALIGN="LEFT"><B>D(MP,NP)</B></TH>
<TH ALIGN="LEFT" NOWRAP>array containing <IMG WIDTH="46" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img228.gif"
ALT="$m \times n$"> column-orthogonal
matrix <B>U</B></TH>
</TR>
<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>W</EM></TD>
<TD ALIGN="LEFT"><B>D(N)</B></TD>
<TD ALIGN="LEFT" NOWRAP><IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img73.gif"
ALT="$n \times n$"> diagonal matrix <B>W</B>
(diagonal elements only)</TD>
</TR>
<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>V</EM></TD>
<TD ALIGN="LEFT"><B>D(NP,NP)</B></TD>
<TD ALIGN="LEFT" NOWRAP>array containing <IMG WIDTH="42" HEIGHT="25" ALIGN="MIDDLE" BORDER="0"
SRC="img73.gif"
ALT="$n \times n$"> orthogonal
matrix <B>V</B> (<I>n.b.</I> not <B>V</B><SUP><I>T</I></SUP>)</TD>
</TR>
<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>WORK</EM></TD>
<TD ALIGN="LEFT"><B>D(N)</B></TD>
<TD ALIGN="LEFT" NOWRAP>workspace</TD>
</TR>
<TR VALIGN="TOP"><TD ALIGN="LEFT"><EM>JSTAT</EM></TD>
<TD ALIGN="LEFT"><B>I</B></TD>
<TD ALIGN="LEFT" NOWRAP>0 = OK, -1 = array A wrong shape, >0 = index of W
for which convergence failed (see note 3, below)</TD>
</TR>
</TABLE></DL>
<P> <DL>
<DT><STRONG>NOTES:</STRONG>
<DD><DL COMPACT>
<DT>1.
<DD>M and N are the <I>logical</I> dimensions of the
matrices and vectors concerned, which can be located in
arrays of larger <I>physical</I> dimensions, given by MP and NP.
<DT>2.
<DD>V contains matrix V, not the transpose of matrix V.
<DT>3.
<DD>If the status JSTAT is greater than zero, this need not
necessarily be treated as a failure. It means that, due to
chance properties of the matrix A, the QR transformation
phase of the routine did not fully converge in a predefined
number of iterations, something that very seldom occurs.
When this condition does arise, it is possible that the
elements of the diagonal matrix W have not been correctly
found. However, in practice the results are likely to
be trustworthy. Applications should report the condition
as a warning, but then proceed normally.
</DL></DL>
<P> <DL>
<DT><STRONG>REFERENCES:</STRONG>
<DD>The algorithm is an adaptation of the routine SVD in the <I>EISPACK</I>
library (Garbow <I>et al.</I> 1977, <I>EISPACK Guide Extension</I>,
Springer Verlag), which is a FORTRAN 66 implementation of the Algol
routine SVD of Wilkinson & Reinsch 1971 (<I>Handbook for Automatic
Computation</I>, vol 2, ed Bauer <I>et al.</I>, Springer Verlag). These
references give full details of the algorithm used here.
A good account of the use of SVD in least squares problems is given
in <I>Numerical Recipes</I> (Press <I>et al.</I> 1987, Cambridge
University Press), which includes another variant of the EISPACK code.
</DL>
<BR> <HR>
<A NAME="tex2html2226" HREF="node181.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_motif.gif"></A>
<A NAME="tex2html2224" HREF="node13.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_motif.gif"></A>
<A NAME="tex2html2218" HREF="node179.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="previous_motif.gif"></A> <A HREF="sun67.html#stardoccontents"><IMG ALIGN="BOTTOM" BORDER="0"
SRC="contents_motif.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2227" HREF="node181.html">SLA_SVDCOV - Covariance Matrix from SVD</A>
<BR>
<B>Up:</B> <A NAME="tex2html2225" HREF="node13.html">SUBPROGRAM SPECIFICATIONS</A>
<BR>
<B> Previous:</B> <A NAME="tex2html2219" HREF="node179.html">SLA_SUPGAL - Supergalactic to Galactic</A>
<BR> <HR> <P>
<P><!--End of Navigation Panel-->
<ADDRESS>
<I>SLALIB --- Positional Astronomy Library<BR>Starlink User Note 67<BR>P. T. Wallace<BR>12 October 1999<BR>E-mail:ptw@star.rl.ac.uk</I>
</ADDRESS>
</BODY>
</HTML>
|