summaryrefslogtreecommitdiff
path: root/191/CH4/EX4.6/Example4_6.sce
diff options
context:
space:
mode:
Diffstat (limited to '191/CH4/EX4.6/Example4_6.sce')
-rwxr-xr-x191/CH4/EX4.6/Example4_6.sce42
1 files changed, 21 insertions, 21 deletions
diff --git a/191/CH4/EX4.6/Example4_6.sce b/191/CH4/EX4.6/Example4_6.sce
index 08c5fe547..51c3a0f77 100755
--- a/191/CH4/EX4.6/Example4_6.sce
+++ b/191/CH4/EX4.6/Example4_6.sce
@@ -1,22 +1,22 @@
-//The Gerchgorin circle
-clc;
-clear;
-close();
-format('v',9);
-x = [0:.1:14];
-plot2d(0,0,-1,"031"," ",[0,-5,14,5]);
-plot(x,0);
-A = [5 1 0;-1 3 1;-2 1 10];
-disp(A,'A = ');
-for i=1:3
- disp(A(i,i),'Centers are : ');
- radius = 0;
- for j=1:3
- if j~=i then
- radius = radius + abs(A(i,j));
- end
- end
- disp(radius,'Radius : ');
- xarc(A(i,i)-radius,radius,2*radius,2*radius,0,360*64);
-end
+//The Gerchgorin circle
+clc;
+clear;
+close();
+format('v',9);
+x = [0:.1:14];
+plot2d(0,0,-1,"031"," ",[0,-5,14,5]);
+plot(x,zeros(length(x),1));
+A = [5 1 0;-1 3 1;-2 1 10];
+disp(A,'A = ');
+for i=1:3
+ disp(A(i,i),'Centers are : ');
+ radius = 0;
+ for j=1:3
+ if j~=i then
+ radius = radius + abs(A(i,j));
+ end
+ end
+ disp(radius,'Radius : ');
+ xarc(A(i,i)-radius,radius,2*radius,2*radius,0,360*64);
+end
disp('The figure indicates that 2 of the eigenvalues of A lie inside the intersected region of 2 circles, and the remaining eigen value in the other circle.'); \ No newline at end of file