residual r=ax-b ∞-norm
Show older comments
This is my code but i dont get the coorect answer
a = [-5 8 -5; 0 0 12; 3 -7 -3;6 -4 4]
b = [1;1;1;1]
x=a\b
r=a*x-b
x1=sqrt(sum(r.*r))
1 Comment
Walter Roberson
on 19 Mar 2019
what is the definition of infinity norm?
Accepted Answer
More Answers (1)
John D'Errico
on 19 Mar 2019
Why would you possibly have expected to get the right answer? Was the infinity norm requested? Is it a 2-norm that you computed?
x1=sqrt(sum(r.*r))
If r is the vector of residuals, then what do you want to compute? It seems like you want the maximum of the absolute value of the residuals. How would you do that?
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!