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

Home » Public Forums » archive » Re: failed matrix inversion returns input-- interesting
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: failed matrix inversion returns input-- interesting [message #49307 is a reply to message #49305] Fri, 14 July 2006 00:14 Go to previous messageGo to previous message
Bringfried Stecklum is currently offline  Bringfried Stecklum
Messages: 75
Registered: January 1996
Member
Ed Hyer wrote:
> Can someone explain this behavior?
> IDL> testm=[[0,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]
> IDL> testmi=invert(testm,status)
> IDL> print,status; 0=success, 1=fail, 2=pivot used
> 1
> IDL> print,testmi
> 0.00000 0.00000 0.00000 0.00000
> 0.00000 1.00000 0.00000 0.00000
> 0.00000 0.00000 1.00000 0.00000
> 0.00000 0.00000 0.00000 1.00000
>
> Is there any reason in creation why IDL simply copies the input into
> the output if it cannot do the inversion? That seems, well, malevolent,
> unless I'm missing something.
>
I would not call this behavior malevolent. For a singular matrix the
inversion is invalid. So the result is meaningless anyway and it does
not matter whether IDL returns a fictious array or the input matrix.
When solving linear equations it is always recommended to check the
condition number of the matrix using cond and use singular value
decomposition in case of an ill-behaved matrix.

regards,

B.St.
  • Attachment: stecklum.vcf
    (Size: 0.20KB, Downloaded 103 times)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL 6.3 for Mac OS X on Intel Now Available
Next Topic: Re: IDL and Macs. Speed is not only about squared roots

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

Current Time: Fri Oct 10 15:33:52 PDT 2025

Total time taken to generate the page: 1.91655 seconds