Red de conocimiento informático - Problemas con los teléfonos móviles - ¿Tca62724fmg requiere programación?

¿Tca62724fmg requiere programación?

/*

43 ventana = 1->;Hanning ventana

44 */

45 bool InitFft(FFT_HANDLE *hfft, int count, int window)

46 {

47 int I;

48

49 hfft->cuenta = cuenta

50 hfft->win = new float[count];

51 if(hfft->;win == NULL)

52 {

53 devuelve false;

54 }

55 hfft->wt = nuevo complejo [recuento]

56 if(hfft->; wt == NULL)

57 {

58 eliminar []hfft->; ganar;

59 devolver falso

60 }

61 for(I = 0; I lt count; i)

62 {

63 hfft->win[I]= float(0.50-0.50 * cos(2 * M_PI * I/(count-1)));

64}

65 for(I = 0; I lt count; i)

66 {

67 ángulo flotante=-I * M _ PI * 2/cuenta;

68 hfft->wt[i]. re = cos(ángulo);

69 hfft->wt[i].

im = sin(ángulo);

70 }

71

72 devuelve verdadero

73 }

74

75 void FFT(FFT_HANDLE *hfft, plural *TD2FD)

76 {

77 int i, j, k, mariposa, p

p>

77 p>

Setenta y ocho

79 int potencia = número de bits(hfft- gt; count

80

81 /*Operaciones Mariposa*/

82 for(k = 0; k lt power; k )

83 {

84 for(j = 0 ; j lt1 lt; ltk; j )

85 {

86 mariposa = 1 lt(power-k); 0; i lt mariposa /2; i )

88 {

89 p=j *butterfly;

90 número complejo t = TD2FD[i p] TD2FD [i p mariposa/2 ];

91 TD2FD[I p mariposa/2]=(TD2FD[I p]-TD2FD[I p mariposa/2])* hfft- gt; 1 lt; ltk) ];

92 TD2FD[I p]= t;

93 }

94 }

95 }

96

97 /*Reordenar*/

98 for(i = 1, j = hfft->; count/2; i lt= hfft- gt; contar- 2; i )

99 {

100 if(I lt; j)

101 {

102 complejo número t = TD2FD[ j];

103 TD2FD[j]= TD2FD[I];

104 TD2FD[I]= t;

105 }

106 k = hfft->count/2;

107 while(k lt; = j)

108 {

109j = j-k;

p>

110k = k/2

111 }

112j = jk

113 }

114 }