-
-
Notifications
You must be signed in to change notification settings - Fork 43
Generate
Sambit Paul edited this page Dec 2, 2023
·
10 revisions
The Generate class helps to generate waveforms for certain periodic functions. As of now, the class supports generating the following functions:
- Sine Signal
- Cosine Signal
- Square Signal
- Sawtooth Signal
- Gaussian Pulse
- Unit Impulse
- Morlet Wavelet
- Ricker Wavelet
- Paul Wavelet
- Chirp Signal
All the signals generated here have a sampling frequency of 100Hz and signal frequency of 10Hz.
int Fs = 100;
Generate gp = new Generate(Fs);
int f1 = 10;
double[] out = gp.generateSineWave(f1);
int Fs = 100;
Generate gp = new Generate(Fs);
int f1 = 10;
double[] out = gp.generateCosineWave(f1);
int Fs = 100;
Generate gp = new Generate(Fs);
int f1 = 10;
double[] out = gp.generateSquareWave(f1);
int Fs = 100;
Generate gp = new Generate(0, 1, Fs);
int f1 = 5;
double[] out_reg_sawtooth = gp.generateSawtooth(f1, 1); //Regular Sawtooth
double[] out_tri_sawtooth = gp.generateSawtooth(f1, 0.5); //Triangular Sawtooth
double[] out_inv_sawtooth = gp.generateSawtooth(f1, 0); //Inverse Sawtooth
int Fs = 100;
Generate gp = new Generate(-1, 1, 2*Fs);
int f1 = 10;
double[] out = gp.generateGaussianPulse(f1);
int Fs = 100;
Generate gp = new Generate(0, 1, Fs);
double position = 0.5; //middle of the signal
double[] out = gp.generateUnitImpulse(position);
int Fs = 100;
Generate gp = new Generate(0, 1, Fs);
int points = 100;
double omega0 = 5; //central frequency
double scaling = 1;
double[] out = gp.generateMorlet(points, omega0, scaling);
int Fs = 100;
Generate gp = new Generate(0, 1, Fs);
int points = 100;
double width = 4;
double[] out = gp.generateRicker(points, width);
int Fs = 100;
Generate gp = new Generate(0, 1, Fs);
int order = 4;
int width = 11;
double[] out = gp.generatePaul(order, width);
int Fs = 100;
Generate gp = new Generate(0, 1, Fs);
double f0 = 0;
double f1 = 10;
double[] out = gp.generateChirp(f0, f1);
Wiki
-
Filters
- IIR Filters
- FIR Filters
- Kernel-Based Filter
- Adaptive Filters
-
Signals
-
Peak Detection
-
Transformations
-
Speech
-
Windowing