the loop is not converging it is giving me an infinite value(it is increasing)
1 次查看(过去 30 天)
显示 更早的评论
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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!