root/branch/leng/sp4a3/sp4a3_kalman_extra.h @ 684
5 | jalaffon | ||
#define error(a) _error(__LINE__,a)
|
|||
281 | jileng | void _error(int l,char * r)
|
|
{
|
|||
int i=0;
|
|||
for(i=0;i<l;i++)
|
|||
{
|
|||
printf("%i",r[i]);
|
|||
};
|
|||
};
|
|||
5 | jalaffon | ||
#define Plot_Mat(Mat,titre) _Plot_Mat(sizeof(Mat)/sizeof(Mat[0]),sizeof(Mat[0])/sizeof(Mat[0][0]),Mat,titre)
|
|||
281 | jileng | void _Plot_Mat(int n,int m,double in[n][m], const char* name){
|
|
int i=0,j=0;
|
|||
printf("%s \n",name);
|
|||
for(i=0;i<n;i++){
|
|||
for(j=0;j<m;j++){
|
|||
printf("%d",in[i][j]);
|
|||
};
|
|||
};
|
|||
};
|
|||
5 | jalaffon | ||
#define Equal_Mat_Mat(Mat_A,Mat_B) _Equal_Mat_Mat(sizeof(Mat_A)/sizeof(Mat_A[0]),sizeof(Mat_A[0])/sizeof(Mat_A[0][0]),Mat_A,sizeof(Mat_B)/sizeof(Mat_B[0]),sizeof(Mat_B[0])/sizeof(Mat_B[0][0]),Mat_B)
|
|||
281 | jileng | int _Equal_Mat_Mat(int na,int ma,double A[na][ma],int nb,int mb,double B[nb][mb]){
|
|
int i,j;
|
|||
int out;
|
|||
for (i=0;i<na;i++){
|
|||
for(j=0;j<ma;j++)
|
|||
{
|
|||
if(A[i][j]!=B[i][j])
|
|||
{
|
|||
out=1;
|
|||
}
|
|||
}
|
|||
}
|
|||
return out;
|
|||
}
|
|||
5 | jalaffon | ||
281 | jileng | extern int debug;
|