File: qr.cat

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (45 lines) | stat: -rw-r--r-- 1,164 bytes parent folder | download
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

qr(G)                          Scilab Function                          qr(G)
NAME
  qr - QR decomposition

CALLING SEQUENCE
  [Q,R]=qr(X)
  [Q,R,E]=qr(X)
  [Q,R,rk,E]=qr(X [,tol])

PARAMETERS

  X    : real or complex matrix

  tol  : nonnegative real number

  Q    : square orthogonal or unitary matrix

  R    : matrix with same dimensions as X

  E    : permutation matrix

  rk   : integer (QR-rank of X*E)

DESCRIPTION
  [Q,R] = qr(X) produces an upper triangular matrix R of the same dimension
  as X and a unitary matrix Q so that X = Q*R.

  [Q,R,E] = qr(X) produces a (column) permutation matrix E, an upper triangu-
  lar R with decreasing diagonal elements and a unitary Q so that X*E = Q*R.

  [Q,R,rk,E] = qr(X ,tol) returns rk = rank estimate of X i.e.  rk is the
  number of diagonal elements in R which are larger than tol.

  [Q,R,rk,E] = qr(X) returns rk = rank estimate of X i.e.  rk is the number
  of diagonal elements in R which are larger than R(1,1)*%eps*max(size(R).

EXAMPLE
  A=rand(5,2)*rand(2,5);
  [Q,R,rk,E] = qr(A,1.d-10);
  norm(Q'*A-R)
  svd([A,Q(:,1:rk)])    //span(A) =span(Q(:,1:rk))

SEE ALSO
  rank, svd, rowcomp, colcomp