Difference between revisions of "ApCoCoA-1:Num.QR"

From ApCoCoAWiki
m (Bot: Category moved)
m (replaced <quotes> tag by real quotes)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
   <command>
+
   {{Version|1}}
 +
<command>
 
     <title>Num.QR</title>
 
     <title>Num.QR</title>
 
     <short_description>Computes the QR-decomposition of a matrix.</short_description>
 
     <short_description>Computes the QR-decomposition of a matrix.</short_description>
Line 23: Line 24:
 
-------------------------------
 
-------------------------------
 
Mat([
 
Mat([
   [<quotes>0.999</quotes>, <quotes>1.999</quotes>, <quotes>2.999</quotes>],
+
   ["0.999", "1.999", "2.999"],
   [<quotes>1.999</quotes>, <quotes>2.999</quotes>, <quotes>3.999</quotes>],
+
   ["1.999", "2.999", "3.999"],
   [<quotes>2.999</quotes>, <quotes>3.999</quotes>, <quotes>4.999</quotes>]
+
   ["2.999", "3.999", "4.999"]
 
])
 
])
 
-------------------------------
 
-------------------------------
Line 31: Line 32:
 
     </description>
 
     </description>
 
     <seealso>
 
     <seealso>
       <see>Introduction to CoCoAServer</see>
+
       <see>ApCoCoA-1:Introduction to CoCoAServer|Introduction to CoCoAServer</see>
       <see>Num.SVD</see>
+
       <see>ApCoCoA-1:Num.SVD|Num.SVD</see>
       <see>Num.EigenValues</see>
+
       <see>ApCoCoA-1:Num.EigenValues|Num.EigenValues</see>
       <see>Num.EigenValuesAndVectors</see>
+
       <see>ApCoCoA-1:Num.EigenValuesAndVectors|Num.EigenValuesAndVectors</see>
       <see>Num.EigenValuesAndAllVectors</see>
+
       <see>ApCoCoA-1:Num.EigenValuesAndAllVectors|Num.EigenValuesAndAllVectors</see>
 
     </seealso>
 
     </seealso>
 
     <types>
 
     <types>

Latest revision as of 13:48, 29 October 2020

This article is about a function from ApCoCoA-1.

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([
  ["0.999", "1.999", "2.999"],
  ["1.999", "2.999", "3.999"],
  ["2.999", "3.999", "4.999"]
])
-------------------------------

See also

Introduction to CoCoAServer

Num.SVD

Num.EigenValues

Num.EigenValuesAndVectors

Num.EigenValuesAndAllVectors