Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: Pseudoinverse in MATLAB

$
0
0
"Bjorn Gustavsson" <bjonr@irf.se> wrote in message <khvf73$o39$1@newscl01ah.mathworks.com>...
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <khtb4b$aqc$1@newscl01ah.mathworks.com>...
> > Of your interests
> >
> > http://www.mathworks.fr/matlabcentral/fileexchange/25453-pseudo-inverse
> >
> > Including customized regularization if needed.
> >
> > Bruno
> >
> ...and for the more general versions of inverse problems and their regularizations:
>
> http://www.mathworks.com/matlabcentral/fileexchange/52-regtools


%Instead of unstable, what I should have said is that the pinv() is a discontinuous function of the data.
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

max(max(abs(A-dA))) %1.0e-05
 max(abs(x-x1)) %1.0+05


For the posted code setting D=dA and with cst=0.001
x2=
  0.999000999000999
   0.009999999000000
max(abs(x-x2)) % 0.0099999990

The the extended algorithm, not posted yet, is independent of the regularization parameter cst.
The extended algorithm is not discussed in http://www.mathworks.fr/matlabcentral/fileexchange/25453-pseudo-inverse

Viewing all articles
Browse latest Browse all 19628

Trending Articles