?? ikroni.c
字號:
/*****************************************************/
/*IkronI */
/*Maritza Rodr韌uez Mart韓ez */
/*Computational Signal Processing Group - march-98 */
/*CSPG - Dr. Domingo Rodr韌uez - Coordinator */
/* */
/*Description: */
/*This function ikroni performs the product between */
/*the tensor product of the matrices IN and IS, */
/*where IN is the identity matrix of order N, and */
/*IS is the identity matrix of order S. The parameter*/
/*of this function are N and S. */
/*****************************************************/
void IkronI(COMPLEX IkronI_VAR[SIZE][SIZE],int N,int S)
{
COMPLEX A[SIZE][SIZE],IkFkI[SIZE][SIZE];
COMPLEX IkronF[SIZE][SIZE];
int temp,l=0,m,k,i,j;
{ /*** zeros ***/
int I,J;
for(I=0;I<=N*S;I++)
for(J=0; J<=N*S; J++) {
IkronI_VAR[I][J].real=0.0;
IkronI_VAR[I][J].imag=0.0;
}
}
for(l=0; l < S; ++l)
for(m=0; m < S ; ++m)
if(m==l){
A[l][m].real= 1.0;
A[l][m].imag= 0.0; }
else{
A[l][m].real =0.0;A[l][m].imag= 0.0; }
{ /*** zeros ***/
int I,J;
for(I=0;I<=S;I++)
for(J=0; J<=S; J++) {
IkronF[I][J].real=0.0;IkronF[I][J].imag=0;
}
}
l=0;
while(l<=N*S){
for(i=0; i<S; ++i){
for(j=0; j<S; ++j){
IkronI_VAR[i+l][j+l].real = A[i][j].real;
IkronI_VAR[i+l][j+l].imag = A[i][j].imag;
}
}
l+=S;
}/*while*/
for (l = 0; l < N*S; ++l)
{
for (j = 0; j < N*S; ++j){
printf("%.1f ",IkronI_VAR[l][j].real);
printf("%.1f ",IkronI_VAR[l][j].imag);
}
printf("\n");
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -