A= [1.02 0.95 0.77 0.67 0.56 0.30 0.16 0.01];
b = [0.39 0.32 0.22 0.18 0.15 0.12 0.13 0.15];
for i = 1:4
num = 10.^(-i);
A = A+num;
b = b+num;
[U,S,V] = svd(A,0);
x(:,:,i) = V.*(S.^(-1)).*U';
r(i)= rank(A);
end
disp(x);
(:,:,1) =
0.2556 -Inf -Inf -Inf -Inf -Inf -Inf -Inf
0.2396 Inf -Inf -Inf -Inf -Inf -Inf -Inf
0.1985 -Inf Inf -Inf -Inf -Inf -Inf -Inf
0.1757 -Inf -Inf Inf -Inf -Inf -Inf -Inf
0.1506 -Inf -Inf -Inf Inf -Inf -Inf -Inf
0.0913 -Inf -Inf -Inf -Inf Inf -Inf -Inf
0.0593 -Inf -Inf -Inf -Inf -Inf Inf -Inf
0.0251 -Inf -Inf -Inf -Inf -Inf -Inf Inf
(:,:,2) =
0.2518 -Inf -Inf -Inf -Inf -Inf -Inf -Inf
0.2362 Inf -Inf -Inf -Inf -Inf -Inf -Inf
0.1961 -Inf Inf -Inf -Inf -Inf -Inf -Inf
0.1738 -Inf -Inf Inf -Inf -Inf -Inf -Inf
0.1493 -Inf -Inf -Inf Inf -Inf -Inf -Inf
0.0914 -Inf -Inf -Inf -Inf Inf -Inf -Inf
0.0602 -Inf -Inf -Inf -Inf -Inf Inf -Inf
0.0267 -Inf -Inf -Inf -Inf -Inf -Inf Inf
(:,:,3) =
0.2514 -Inf -Inf -Inf -Inf -Inf -Inf -Inf
0.2359 Inf -Inf -Inf -Inf -Inf -Inf -Inf
0.1959 -Inf Inf -Inf -Inf -Inf -Inf -Inf
0.1736 -Inf -Inf Inf -Inf -Inf -Inf -Inf
0.1492 -Inf -Inf -Inf Inf -Inf -Inf -Inf
0.0914 -Inf -Inf -Inf -Inf Inf -Inf -Inf
0.0602 -Inf -Inf -Inf -Inf -Inf Inf -Inf
0.0269 -Inf -Inf -Inf -Inf -Inf -Inf Inf
(:,:,4) =
0.2514 -Inf -Inf -Inf -Inf -Inf -Inf -Inf
0.2358 Inf -Inf -Inf -Inf -Inf -Inf -Inf
0.1958 -Inf Inf -Inf -Inf -Inf -Inf -Inf
0.1736 -Inf -Inf Inf -Inf -Inf -Inf -Inf
0.1492 -Inf -Inf -Inf Inf -Inf -Inf -Inf
0.0914 -Inf -Inf -Inf -Inf Inf -Inf -Inf
0.0603 -Inf -Inf -Inf -Inf -Inf Inf -Inf
0.0269 -Inf -Inf -Inf -Inf -Inf -Inf Inf
disp(r);
1 1 1 1