📄 window.c
字号:
#include <math.h>
#define PI2 6.283185307
#include "../include/amr_plus.h"
/*----------------------------------------------------------*
* Procedure cos_window: *
* ~~~~~~~~~~~ *
* To find the cos window of length n1+n2 *
* *
* fh[i] = cos(-pi/2 ... pi/2) *
*----------------------------------------------------------*/
void cos_window(float *fh, int n1, int n2)
{
double cc, cte;
int i;
cte = 0.25*PI2/(float)n1;
cc = 0.5*cte - 0.25*PI2;
for (i = 0; i < n1; i++)
{
*fh++ = (float)cos(cc);
cc += cte;
}
cte = 0.25*PI2/(float)n2;
cc = 0.5*cte;
for (i = 0; i < n2; i++)
{
*fh++ = (float)cos(cc);
cc += cte;
}
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -