the loop is not converging it is giving me an infinite value(it is increasing)
1 view (last 30 days)
Show older comments
clear variables
close all
clc
A = [1 1 2; 1 2 4; 1 2 5];
x = [1; 2; 3];
Error = 0.00001;
Diff= 1;
while Diff>Error
x1=A*x;
Diff=norm(x1-x);
x=x1;
end
See Also
Categories
Find more on Sparse Matrices 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!