The results display problem
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jiapeng
am 21 Nov. 2022
Beantwortet: David Hill
am 21 Nov. 2022
My code ishere. How about displaying every x and r from 1 to 4?
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 = V.*(S.^(-1)).*U';
r = rank(A);
end
disp(x);
disp(r);
0 Kommentare
Akzeptierte Antwort
David Hill
am 21 Nov. 2022
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);
disp(r);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Chebyshev finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!