由已知的频率,画出想要的频率曲线。
float AAAA::IntegralTrapezoid(int x, std::vector<float> &src, float lamda0)
{
float m = 0.8;
float f0 = 2*PI/ lamda0;
float f1 = (1 + m)*f0;
int a = 1;
int b = 1;
float Tt = 0;
std::vector<float> omiga(4960, 0);
for (int j = 0; j < x; j++)
{
float T = 1;
if (src[j] == f0)
{
a++;
}
else
{
b++;
}
Tt =( a*T*f0 + b*T*f1);
}
/*for (int i = 1; i < x; i++)
{
Tt = (src[i] - src[i - 1]) / (0.025 / 200);
}*/
return Tt;
}
void AAAA::GenFMWave(std::vector<float> const & s, f