-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Final Release May 17 1042PM
- Loading branch information
mohamed-shaapan
committed
May 17, 2017
1 parent
a280aa7
commit 6985406
Showing
29 changed files
with
797 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
x^3-3 -1 5 50 0.0001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
3 | ||
x y z | ||
12*x+3*y-5*z=1 | ||
x+5*y+3*z=28 | ||
3*x+7*y+13*z=76 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
3 | ||
x y z | ||
2*x+y+4*z=1 | ||
x+2*y+3*z=1.5 | ||
4*x-y+2*z=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
3 | ||
x1 x2 x3 | ||
2*x1+x2+4*x3=1 | ||
x1+2*x2+3*x3=1.5 | ||
4*x1-x2+2*x3=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
4 | ||
x1 x2 x3 x4 | ||
2*x1+x2+4*x3+5*x4=1 | ||
x1+2*x2+3*x3-x4=1.5 | ||
4*x1-x2+2*x3+2*x4=2 | ||
3*x1+3*x2-2*x3+3*x4=6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
x^3-3 -1 5 50 0.0001 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
epsilon = 0.0001; | ||
max_iterations = 50; | ||
|
||
%test case 1 | ||
%coeff_matrix=[2,1,4; 1,2,3; 4,-1,2]; | ||
%constants_matrix=[1,1.5,2]; | ||
|
||
%test case 2 | ||
coeff_matrix=[12,3,-5; 1,5,3; 3,7,13]; | ||
constants_matrix=[1,28,76]; | ||
|
||
|
||
initial_guess=[1,0,1]; | ||
|
||
|
||
addpath('./logic'); | ||
[solution, iterations, data] = gauss_siedel(coeff_matrix, constants_matrix, initial_guess, max_iterations, epsilon); | ||
|
||
disp(solution); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/linear_systems/outputs/gauss_siedel_17-May-2017 21_40_49.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
| x1| x2| x3| Err_x1| Err_x2| Err_x3| | ||
1| -3.2500| 21.6000| 21.2308| 5.1538| 1.9259| 1.9420| | ||
2| 3.5295| -6.4885| -5.0346| 1.9208| 4.3290| 5.2170| | ||
3| -0.3923| 7.9149| 8.5254| 9.9967| 1.8198| 1.5905| | ||
4| 1.6569| 0.5632| 1.6748| 1.2368| 13.0535| 4.0903| | ||
5| 0.6404| 4.2637| 5.1605| 1.5873| 0.8679| 0.6755| | ||
6| 1.1676| 2.3756| 3.4025| 0.4516| 0.7948| 0.5167| | ||
7| 0.9072| 3.3250| 4.2975| 0.2871| 0.2855| 0.2083| | ||
8| 1.0427| 2.8401| 3.8464| 0.1300| 0.1707| 0.1173| | ||
9| 0.9760| 3.0836| 4.0763| 0.0684| 0.0790| 0.0564| | ||
10| 1.0109| 2.9590| 3.9605| 0.0345| 0.0421| 0.0292| | ||
11| 0.9938| 3.0215| 4.0195| 0.0172| 0.0207| 0.0147| | ||
12| 1.0028| 2.9895| 3.9899| 0.0089| 0.0107| 0.0074| | ||
13| 0.9984| 3.0055| 4.0050| 0.0044| 0.0053| 0.0038| | ||
14| 1.0007| 2.9973| 3.9974| 0.0023| 0.0027| 0.0019| | ||
15| 0.9996| 3.0014| 4.0013| 0.0011| 0.0014| 0.0010| | ||
|
||
number of iterations: 15 | ||
execution time: 0.772864 |
Binary file not shown.
Oops, something went wrong.