Difference between revisions of "ApCoCoA-1:Num.QR"
From ApCoCoAWiki
Line 8: | Line 8: | ||
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them. | <em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them. | ||
<par/> | <par/> | ||
− | + | This command computes the QR-decomposition of a matrix using the external library Lapack, i.e. the matrix <tt>A</tt> will be decomposed into the product of an orthogonal matrix <tt>Q</tt> and an upper-right triangular matrix <tt>R</tt>. | |
<itemize> | <itemize> | ||
− | <item>@param <em>A</em> | + | <item>@param <em>A</em> The matrix to decompose.</item> |
− | <item>@return An orthogonal matrix Q and an upper-right triangular matrix R such that Q*R=A.</item> | + | <item>@return An orthogonal matrix <tt>Q</tt> and an upper-right triangular matrix <tt>R</tt> such that <tt>Q*R=A</tt>.</item> |
</itemize> | </itemize> | ||
Revision as of 11:29, 8 July 2009
Num.QR
Computes the QR-decomposition of a matrix.
Syntax
Num.QR(A:MAT):[Q:MAT,R:MAT]
Description
Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them.
This command computes the QR-decomposition of a matrix using the external library Lapack, i.e. the matrix A will be decomposed into the product of an orthogonal matrix Q and an upper-right triangular matrix R.
@param A The matrix to decompose.
@return An orthogonal matrix Q and an upper-right triangular matrix R such that Q*R=A.
Example
Points:=Mat([[1,2,3],[2,3,4],[3,4,5]]); QR := Num.QR(Points); Dec(QR[1]*QR[2],3); -- CoCoAServer: computing Cpu Time = 0 ------------------------------- Mat([ [<quotes>0.999</quotes>, <quotes>1.999</quotes>, <quotes>2.999</quotes>], [<quotes>1.999</quotes>, <quotes>2.999</quotes>, <quotes>3.999</quotes>], [<quotes>2.999</quotes>, <quotes>3.999</quotes>, <quotes>4.999</quotes>] ]) -------------------------------
See also