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

Home » Public Forums » archive » Re: Help with SVDC procedure
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: Help with SVDC procedure [message #82968 is a reply to message #82963] Mon, 28 January 2013 18:45 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Monday, January 28, 2013 4:24:44 PM UTC-5, fd_...@mail.com wrote:
> Hi
>
>
>
> I am trying to solve a matrix system with SVD method. Ihave the following arrays: A( 100 rows by 4 columns), X (4 rows by 1 column) and B (100 rows by 1 column). The form of the system is Ax=B. I used the Linear Least Squares and get the form x= V invert(SV) transpose(U)B (based on SVD procedure in IDL). The problem is that the 4 values that I get for the array x are not what I expected. I used the same method, same commands but with simpler arrays and it works. Why this doesn't work for my arrays??
...

You say that the values you get for X are not what you expected. But I would try it the other way around. Does the value of X you get solve the equation, Ax = B, correctly? If it does, then you found *a* solution to the equation, even if it is not the one you expected.

You are claiming to do least squares so no solution will solve the system precisely, but you can test to see which solution (your expected solution or your obtained solution) has smaller errors.

Also, as a matter of efficiency, your SV matrix is diagonal. Thus you can just compute SVinv = 1/SV rather than using INVERSE().

CM
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Round a number
Next Topic: Re: Remove Duplicate Rows

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

Current Time: Wed Oct 08 19:02:02 PDT 2025

Total time taken to generate the page: 0.00188 seconds