Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Pseudoinverse in MATLAB
Replies: 12   Last Post: Mar 19, 2013 12:55 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Greg Heath

Posts: 5,965
Registered: 12/7/04
Re: Pseudoinverse in MATLAB
Posted: Mar 14, 2013 3:45 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Daniel Vasilaky" wrote in message <khralp$bgq$1@newscl01ah.mathworks.com>...
> Elias Kyriakides <elias_kyriakides@hotmail.com> wrote in message <3AC15EAA.F5CACB12@hotmail.com>...
-----SNIP

> The SVD approach of pinv() is unstable.
-----SNIP

> %Example 1:
> format long;
> A = [1 0;0 0;0 0];
> b=[1;1;1];
> pA = pinv(A);
> x = pA*b
> dA = [1 0;0 10e-6;0 0];
> pdA = pinv(dA);
> x1 = pdA*b


That does NOT demonstrate that the SVD approach of pinv() is unstable
I think you are slightly confused about what pinv really needs to satisfy

help pinv

B = [ 1 0 ; 0 1e-5 ; 0 0 ]
pinvB = pinv(B)
pinvB = [ 1 0 0 ; 0 1e5 0]
B*pinvB = [1 0 0 ; 0 1 0; 0 0 0 ]
pinvB*B = [ 1 0 ; 0 1 ]

check1 = max(max(abs(B-B*pinvB*B)) ) % 1.694e-21
check2 = max(max(abs(pinvB-pinvB*B*pinvB)) ) % 1.456e-11
check3 = max(max(abs(pinvB*B-(pinvB*B)')) ) % 0
check4 =max( max(abs(B*pinvB-(B*pinvB)')) ) % 0

Hope this helps.

Greg



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.