Add files via upload

This commit is contained in:
bliou000 2021-12-04 12:46:30 -08:00 committed by GitHub
parent 8581cbcf85
commit 932a93269a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

13
src/generate_white.m Normal file
View File

@ -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