forked from DodgeHo/VMD_cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVMD.h
More file actions
25 lines (20 loc) · 884 Bytes
/
VMD.h
File metadata and controls
25 lines (20 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#include <vector>
#include <cmath>
#include <ctime>
#include <Eigen/Core>
#include <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);
MatrixXcd vector_to_MatrixXcd_in_col(vectorcd& Input);
vectorcd ExtractColFromMatrixXcd(MatrixXcd& Input, const int k, const int T);
vectorcd ExtractRowFromMatrixXd(MatrixXd& Input, const int k, const int T);
MatrixXcd sum(Matrix3DXd& u_hat_plus, const int n);