⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ikroni.c

📁 java-fft-demo,用java开发的实现fft的平台
💻 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");
 }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -