-
Notifications
You must be signed in to change notification settings - Fork 8
/
VMD.h
23 lines (20 loc) · 855 Bytes
/
VMD.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include <vector>
#include <cmath>
#include <ctime>
#include "eigen/Eigen/Eigen"
#include "eigen/unsupported/Eigen/FFT"
//#include <eigen/Eigen/Core>
//#include <eigen/unsupported/Eigen/FFT>
#define pI acos(-1)
using namespace Eigen;
typedef std::vector<double> vectord;
typedef std::vector<std::complex<double> > vectorcd;
typedef std::vector<MatrixXcd> Matrix3DXd;
void VMD(MatrixXd& u, MatrixXcd& u_hat, MatrixXd& omega,
vectord& signal, const double alpha, const double tau,
const int K, const int DC, const int init, const double tol, const double eps);
vectorcd circshift(vectorcd& data, int offset);
vectord omega_init_method2(int K, const double fs);
vectorcd ExtractColFromMatrixXcd(MatrixXcd& Input, const int k, const int T);
vectorcd ExtractRowFromMatrixXd(MatrixXd& Input, const int k, const int T);