? numerical TLS



Hi:

Though TLS has closed form soln, I'm curious what if I calculate it
numerically.

Below is a MatLab script I used to test this. But it does not converge close
to closed

form. Any way to improve it or what did I make wrong?

Thanks,
by Cheng Cosine
Apr/26/2k7 NC

% setup the system
M = 7; N = 5;
A = magic(max(M,N)); A = A(1:M,1:N);
b = linspace(1,M,M)';
x = pinv(A)*b;

% setup the noise
NoiseA = rand(size(A));
Noiseb = rand(size(b));

% setup the noisy system
ANoisy = A+NoiseA;
bNoisy = b+Noiseb;

% numerically solve TLS problem
x0 = rand(N,1); % initial guess
[xTLSNum, resnorm, residual, exitflag, output, lambda] = ...
lsqnonlin(@funcTLS, x0, [], [], [], [bNoisy, ANoisy]);



function y = funcTLS(x, AExtend)


x = x./norm(x);
xExtend = [-1.0; x];
y = AExtend*xExtend;


.



Relevant Pages

  • Re: ? numerical TLS
    ... > Though TLS has closed form soln, I'm curious what if I calculate it ... >% setup the system ... x this is not the TLS solution, especially not for ANoisy,bNoisy. ... > % setup the noisy system ...
    (sci.math.num-analysis)
  • Re: ? numerical TLS
    ... > Though TLS has closed form soln, I'm curious what if I calculate it ... x this is not the TLS solution, especially not for ANoisy,bNoisy. ... The key above is to pick the right singular vector corresponding to the ... with no special normalization requirement you have ...
    (sci.math.num-analysis)
  • Re: ? numerical TLS
    ... > Though TLS has closed form soln, I'm curious what if I calculate it ... x this is not the TLS solution, especially not for ANoisy,bNoisy. ... correspondingly but in computing the tls you have an arbitrary common ... The key above is to pick the right singular vector corresponding to the ...
    (sci.math.num-analysis)
  • Re: ? numerical TLS
    ... > Though TLS has closed form soln, I'm curious what if I calculate it ... x this is not the TLS solution, especially not for ANoisy,bNoisy. ... no, this is just a normalization _after_ computing the xTLS, useful for example ...
    (sci.math.num-analysis)