octave-bug-tracker
[Top][All Lists]

## [Octave-bug-tracker] [bug #44061] U and V result matrises are not othogo

 From: anonymous Subject: [Octave-bug-tracker] [bug #44061] U and V result matrises are not othogonal Date: Wed, 21 Jan 2015 16:23:37 +0000 User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0

```URL:
<http://savannah.gnu.org/bugs/?44061>

Summary: U and V result matrises are not othogonal
Project: GNU Octave
Submitted by: None
Submitted on: Wed 21 Jan 2015 04:23:36 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Svend H. SÃ¸rensen
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.2
Operating System: GNU/Linux

_______________________________________________________

Details:

octave:2> A = spconvert(two_vars_neg_in)
A =

Compressed Column Sparse (rows = 4, cols = 4, nnz = 8 [50%])

(1, 1) -> -1
(2, 1) -> -1
(3, 1) ->  1
(4, 1) ->  1
(1, 2) -> -1
(2, 2) ->  1
(3, 2) -> -1
(4, 2) ->  1

octave:3>  [U,S,V]= svds(A,rows(A),rows(A))
U =

-0.50000   0.50000   1.00000   0.00000
0.50000   0.50000   0.00000   1.00000
-0.50000  -0.50000   0.00000   1.00000
0.50000  -0.50000   1.00000   0.00000

S =

Diagonal Matrix

2   0   0   0
0   2   0   0
0   0   0   0
0   0   0   0

V =

-0.00000  -1.00000   0.00000   0.00000
1.00000   0.00000   0.00000   0.00000
0.00000   0.00000   0.00000   0.00000
0.00000   0.00000   0.00000   0.00000

octave:4> #[U,S,V] = svd (full(A) )
octave:4> ss = diag(S)
ss =

2
2
0
0

octave:5> nnull=sum(ss(:)==0)
nnull =  2
octave:6> V'*V  ## this should result en the identity matrix but does not !!
ans =

1.00000   0.00000   0.00000   0.00000
0.00000   1.00000   0.00000   0.00000
0.00000   0.00000   0.00000   0.00000
0.00000   0.00000   0.00000   0.00000

octave:7> U'*U  ## here again we expect to see the identity matrix
ans =

1.00000   0.00000   0.00000   0.00000
0.00000   1.00000   0.00000   0.00000
0.00000   0.00000   2.00000   0.00000
0.00000   0.00000   0.00000   2.00000

_______________________________________________________

File Attachments:

-------------------------------------------------------
Date: Wed 21 Jan 2015 04:23:36 PM UTC  Name: two_vars_neg_in.sparse  Size:
121B   By: None

-------------------------------------------------------
Date: Wed 21 Jan 2015 04:23:36 PM UTC  Name: svd-2-var.oct  Size: 178B   By:
None

_______________________________________________________

<http://savannah.gnu.org/bugs/?44061>

_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/

```