comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Decompose a matrix
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Decompose a matrix [message #57688] Wed, 19 December 2007 06:08 Go to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Dec 19, 12:15 pm, d.po...@gmail.com wrote:
> Folks
> I have a problem could anyone help me?
> Let:
> A = [[ 0,0,1], $
> [ 0,1,0], $
> [ 0,0,0]]
> B = [0.5,0.5,1]
>
> ; Decompose A
> SVDC, A, W, U, V
> ; Solve A.X=B
> X=SVSOL(U, W, V, B)
> new_B=A##X
> IDL> print,new_B
> 0.500000
> 0.500000
> 0.000000
> Why new_B is not equal to B' ?
> Thanks for any help in advance
> Cheers
> Dave
A simple workaround (read: cheat) is to make sure your Eigenvalues are
_close_ to zero rather than equal to zero. I guess it depends on how
accurate you need your results to be :-)

A*=1.0
A[0,2]+=0.01
SVDC, A, W, U, V
X=SVSOL(U, W, V, B)
PRINT,TRANSPOSE(A##X)
IDL> 0.500000 0.500000 1.00000
You'd probably want to do the whole thing in double precision so you
could use a smaller zero-offset.

Take care,
Chris
[Message index]
 
Read Message
Read Message
Previous Topic: Decompose a matrix
Next Topic: print and printf

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:34:51 PDT 2025

Total time taken to generate the page: 0.00407 seconds