Skip to content
Snippets Groups Projects
Waveform.h 608 B
Newer Older
  • Learn to ignore specific revisions
  • xiyehu2's avatar
    xiyehu2 committed
    #pragma once
    
    #include <Eigen/Dense>
    
    xiyehu2's avatar
    xiyehu2 committed
    #include <string>
    
    namespace Waveform {
    	class WaveformParam {
    		public:
    		unsigned long samplingRate;
    		unsigned long freqResolution;
    		Eigen::VectorXi freqTones;
    		Eigen::VectorXd phases;
    		Eigen::VectorXd amplitudes;
    
    		WaveformParam();
    		WaveformParam(const WaveformParam& other);
    		void setFreqTone(
    			int centerFreq, 
    			int freqSpacing,
    			int numTones
    		);
    		void setFreqTone(const Eigen::VectorXi otherTone);
    		void setPhase(const Eigen::VectorXd otherPhase);
    		void setAmplitude(const Eigen::VectorXd otherAmp);
    
    xiyehu2's avatar
    xiyehu2 committed
    		void saveParam(std::string fileName);