📄 cmath.h
字号:
//---------------------------------------------------------------------------
#ifndef CMathH
#define CMathH
//
typedef struct Pointf
{
int sequence;
float x[10];
}Point_f;
typedef struct Pointz
{
float x[10];
}Point_z;
typedef struct{
float real; //复数的实部
float image; //复数的虚部
}Complex;
extern int num[18];
extern int num_Nc[18];
extern int num_Nc_num[18][27];
extern int enumerate[18][27][27];
// Point_z Center[10][27];
//---------------------------------------------------------------------------
class CMath
{
public:
CMath();
virtual ~CMath();
public:
float __fastcall maximum(float *x, int n);//时域最大值
float __fastcall minimum(float *x, int n);//时域最小值
float __fastcall aversquare(float *x, int n); //均方根值=有效值
float __fastcall kurtosis(float *x, int n);//求峭度值
float __fastcall kurtosis_coeff(float *x, int n);//求峭度因子
float __fastcall aver(float *x, int n); //计算平均值
float __fastcall average(float *x, int n);//计算绝对均值
float __fastcall equation(float *x, int n);//计算方差
float __fastcall p_p(float *x, int n);//计算峰峰值
float __fastcall square_equation(float *x, int n);//计算方根幅值
float __fastcall peak_coeff(float*x, int n);//计算峰值系数:峰值与均方根的比值
float __fastcall wave_coeff(float *x, int n);//计算波形系数:均方根与平均幅值的比值
float __fastcall pulse_coeff(float *x, int n);//计算脉冲值标:峰值与平均幅值的比值
float __fastcall square_equation_coeff(float *x, int n); //裕度因子:峰值与方根幅值的比值
int __fastcall Arraycollection(float * data,int vec); //ISODATA进行聚类分析
float __fastcall Distance(float * data_a, float* data_b, int n);
float __fastcall CalDistance_f(Point_f x1, Point_f x2,int vec);
float __fastcall CalDistance_z(Point_z x1, Point_z x2,int vec);
float __fastcall CalDistance_fz(Point_f x1, Point_z x2,int vec);
void __fastcall zeroaverage(float * x, int n);
void __fastcall fft(int n, Complex * y, int flag);
float __fastcall max_frequency(float * data_c, int lenth);
float __fastcall SquareSum(float a, float b);
void __fastcall ppp(float a[], float e[], float s[], float v[], int m, int n);
void __fastcall sss(float fg[], float cs[]);
int __fastcall SVD(float a[], int m, int n, float u[], float v[], float eps, int ka);
void __fastcall brmul(float a[], float b[], int m, int n, int k, float c[]);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -