|
@@ -1,10 +1,10 @@
|
|
function A=matrice(n,i_mat)
|
|
function A=matrice(n,i_mat)
|
|
-%
|
|
|
|
-% A = matrice(n,i_mat)
|
|
|
|
-
|
|
|
|
|
|
+%
|
|
|
|
+% function [A] = matrice(n,i_mat)
|
|
|
|
+%
|
|
% This function allows to choose the coefficient matrix of
|
|
% This function allows to choose the coefficient matrix of
|
|
% the linear system A*x=b.
|
|
% the linear system A*x=b.
|
|
-%
|
|
|
|
|
|
+%
|
|
% Input :
|
|
% Input :
|
|
% n : the size of the coefficient matrix of
|
|
% n : the size of the coefficient matrix of
|
|
% the linear system A*x=b
|
|
% the linear system A*x=b
|
|
@@ -16,11 +16,11 @@ function A=matrice(n,i_mat)
|
|
% if i_mat = 3 then A(i,j) = abs(i-j)+1/(i-j) if (j < i and j > i)
|
|
% if i_mat = 3 then A(i,j) = abs(i-j)+1/(i-j) if (j < i and j > i)
|
|
% and A(i,j) = 0 if i=j \n')
|
|
% and A(i,j) = 0 if i=j \n')
|
|
% if i_mat = 4 then A(i,j)= i+j
|
|
% if i_mat = 4 then A(i,j)= i+j
|
|
-%
|
|
|
|
|
|
+%
|
|
% Output :
|
|
% Output :
|
|
% A : the coefficient matrix of the linear system A*x=b
|
|
% A : the coefficient matrix of the linear system A*x=b
|
|
-%
|
|
|
|
-%
|
|
|
|
|
|
+%
|
|
|
|
+%
|
|
if (i_mat==1)
|
|
if (i_mat==1)
|
|
a=input('Enter alpha : ');
|
|
a=input('Enter alpha : ');
|
|
b=input('Enter beta : ');
|
|
b=input('Enter beta : ');
|