Incorrect number or types of inputs or outputs for function perturb.
n = 100;
A = rand(n);
AInv = inv(A);
x = ones(n, 1);
b = A * x;
bTilde = perturb(b, 1e-10);
xApp = Ab;
xTildeApp = AbTilde;
disp(‘x minus xTilde’)
xdiff = norm(xApp-xTildeApp)/norm(xApp);
disp(‘b minus bTilde’)
bDiff = norm(b-bTilde)/norm(b);
disp(‘estimate’)
normA = norm(A);
normAInv = norm(AInv);
estimate = normA*normAInv*bDiff
What’s wrong with perturb function input?n = 100;
A = rand(n);
AInv = inv(A);
x = ones(n, 1);
b = A * x;
bTilde = perturb(b, 1e-10);
xApp = Ab;
xTildeApp = AbTilde;
disp(‘x minus xTilde’)
xdiff = norm(xApp-xTildeApp)/norm(xApp);
disp(‘b minus bTilde’)
bDiff = norm(b-bTilde)/norm(b);
disp(‘estimate’)
normA = norm(A);
normAInv = norm(AInv);
estimate = normA*normAInv*bDiff
What’s wrong with perturb function input? n = 100;
A = rand(n);
AInv = inv(A);
x = ones(n, 1);
b = A * x;
bTilde = perturb(b, 1e-10);
xApp = Ab;
xTildeApp = AbTilde;
disp(‘x minus xTilde’)
xdiff = norm(xApp-xTildeApp)/norm(xApp);
disp(‘b minus bTilde’)
bDiff = norm(b-bTilde)/norm(b);
disp(‘estimate’)
normA = norm(A);
normAInv = norm(AInv);
estimate = normA*normAInv*bDiff
What’s wrong with perturb function input? perturb, function, linear algebra, matlab MATLAB Answers — New Questions