diff --git a/src/generate_white.m b/src/generate_white.m new file mode 100644 index 0000000..ce3fb2d --- /dev/null +++ b/src/generate_white.m @@ -0,0 +1,13 @@ +function x = generate_white(amplitude, fs, duration) +%GENERATE_WHITE: returns a matrix of sampled white noise + +%CONTRIBUTORS: +%Benjamin Liou: Original author + +%DOCUMENTATION: +% white noise can then be filtered to produce different hues of noises + + +%time domain matrix of random sample points between +-amplitude +x = amplitude * 2 * (rand(1, fs * duration) - 0.5); +end \ No newline at end of file