Provides basic functions to form discrete wave shapes
More...
|
| static double [] | GaussNoise (int samples, Random rand) |
| | Returns a random (noise) array that has a Gaussian distribution More...
|
| |
| static double [] | PN (int samples, Random rand) |
| | Pseudorandom number generator More...
|
| |
| static double [] | Row (double start, double step, double end) |
| | Returns a row array by specifing limits and a step value More...
|
| |
| static double [] | Sawtooth (double f, double amplitude, double fs, int components, int samples) |
| | Returns a sawtooth wave More...
|
| |
| static double [] | Sine (double f, double amplitude, double phase, double offset, double fs, int samples) |
| | Returns a sine wave (overloaded) More...
|
| |
| static double [] | Sine (double f, double amplitude, double fs, int samples) |
| | Returns a sine wave More...
|
| |
| static double [] | Square (double f, double amplitude, double fs, int components, int samples) |
| | Returns a square wave More...
|
| |
| static double [] | Triangle (double f, double amplitude, double fs, int components, int samples) |
| | Returns a triangle wave More...
|
| |
Provides basic functions to form discrete wave shapes
◆ GaussNoise()
| static double [] dsp.Generator.GaussNoise |
( |
int |
samples, |
|
|
Random |
rand |
|
) |
| |
|
static |
Returns a random (noise) array that has a Gaussian distribution
- Parameters
-
| samples | size of the wave |
| rand | random object |
◆ PN()
| static double [] dsp.Generator.PN |
( |
int |
samples, |
|
|
Random |
rand |
|
) |
| |
|
static |
Pseudorandom number generator
- Parameters
-
| samples | size of the wave |
| rand | random object |
◆ Row()
| static double [] dsp.Generator.Row |
( |
double |
start, |
|
|
double |
step, |
|
|
double |
end |
|
) |
| |
|
static |
Returns a row array by specifing limits and a step value
- Parameters
-
| start | start index value |
| step | step value, can be incremental(+) or decremental(-) |
| end | end index value |
Example
double[] A = Generator.Row(0.5, 1.5, 4);
Console.WriteLine(NArray.ToString(A));
◆ Sawtooth()
| static double [] dsp.Generator.Sawtooth |
( |
double |
f, |
|
|
double |
amplitude, |
|
|
double |
fs, |
|
|
int |
components, |
|
|
int |
samples |
|
) |
| |
|
static |
Returns a sawtooth wave
- Parameters
-
| f | foundamental frequency (Hz) |
| amplitude | amplitude |
| fs | sampling rate (Hz) |
| components | number of harmonic components |
| samples | size of the wave |
◆ Sine() [1/2]
| static double [] dsp.Generator.Sine |
( |
double |
f, |
|
|
double |
amplitude, |
|
|
double |
phase, |
|
|
double |
offset, |
|
|
double |
fs, |
|
|
int |
samples |
|
) |
| |
|
static |
Returns a sine wave (overloaded)
- Parameters
-
| f | foundamental frequency (Hz) |
| amplitude | amplitude |
| phase | initial phase in radians |
| offset | vertical offset |
| fs | sampling rate (Hz) |
| samples | size of the wave |
◆ Sine() [2/2]
| static double [] dsp.Generator.Sine |
( |
double |
f, |
|
|
double |
amplitude, |
|
|
double |
fs, |
|
|
int |
samples |
|
) |
| |
|
static |
Returns a sine wave
- Parameters
-
| f | foundamental frequency (Hz) |
| amplitude | amplitude |
- Parameters
-
| fs | sampling rate (Hz) |
| samples | size of the wave |
◆ Square()
| static double [] dsp.Generator.Square |
( |
double |
f, |
|
|
double |
amplitude, |
|
|
double |
fs, |
|
|
int |
components, |
|
|
int |
samples |
|
) |
| |
|
static |
Returns a square wave
- Parameters
-
| f | foundamental frequency (Hz) |
| amplitude | amplitude |
| fs | sampling rate (Hz) |
| components | number of harmonic components |
| samples | size of the wave |
◆ Triangle()
| static double [] dsp.Generator.Triangle |
( |
double |
f, |
|
|
double |
amplitude, |
|
|
double |
fs, |
|
|
int |
components, |
|
|
int |
samples |
|
) |
| |
|
static |
Returns a triangle wave
- Parameters
-
| f | foundamental frequency (Hz) |
| amplitude | amplitude |
| fs | sampling rate (Hz) |
| components | number of harmonic components |
| samples | size of the wave |