Révision 524
Ajouté par Khalid YAZID il y a presque 3 ans
branch/yazid/sp4a3/sp4a3_kalman.c | ||
---|---|---|
|
||
|
||
void Add_Mat_Mat(int na,int ma,double A[na][ma],int nb,int mb,double B[nb][mb], double R[na][ma]){
|
||
int i,j;
|
||
double l;
|
||
if(na==nb && ma==mb){
|
||
for (int i = 0; i < na; i++){
|
||
for (int j = 0; j < mb; j++){
|
||
l=A[i][j] + B[i][j];
|
||
R[i][j] = l;
|
||
}
|
||
}
|
||
}
|
||
|
||
else{
|
||
printf("Dimensions trop grandes\n");
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
void Inverse_Mat_22(int n,int m,double A[n][m],double B[n][m]){
|
||
|
||
double det=1/((A[0][0]*A[1][1])-(A[0][1]*A[1][0]));
|
||
B[0][0]=A[1][1]*det;
|
||
B[1][1]=A[0][0]*det;
|
||
B[0][1]=-A[0][1]*det;
|
||
B[1][0]=-A[1][0]*det;
|
||
}
|
||
|
||
void Transpose_Mat(int n,int m,double A[n][m],double R[m][n]){
|
Formats disponibles : Unified diff
IMPLANTATION DES FONCTIONS ADDITION ET INVERSE