35 lines
775 B
C++
35 lines
775 B
C++
|
|
#pragma once
|
|
#ifndef _DATAGET_H_
|
|
#define _DATAGET_H_
|
|
/**
|
|
* @file fft_get.hpp
|
|
* @brief fft函数
|
|
* @author your name (you@domain.com)
|
|
* @version 0.1
|
|
* @date 2023-12-22
|
|
*
|
|
* Copyright: Baosight Co. Ltd.
|
|
* DO NOT COPY/USE WITHOUT PERMISSION
|
|
*
|
|
*/
|
|
#include <array>
|
|
#include <eigen3/Eigen/Eigen>
|
|
#include <random>
|
|
#include <vector>
|
|
|
|
namespace data_process {
|
|
using std::vector;
|
|
using namespace Eigen;
|
|
const double PI3 = 3.1416; // pi
|
|
/**
|
|
* @brief fft变换
|
|
* @param singles 信号
|
|
* @param fs 采样频率
|
|
* @return Matrix<double, Dynamic, 2>
|
|
*/
|
|
Matrix<double, Dynamic, 2> fft_get(Matrix<double, Dynamic, 1> singles,
|
|
double fs); //信号段 采样频率
|
|
} // namespace data_process
|
|
|
|
#endif //_DATAFET_H_
|