Created
August 16, 2021 06:10
-
-
Save jaimedantas/c6a09c139ff6dc4b17fa3f55d26eeb0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function y = randlap(mu, sigma) | |
% mean mu and standard deviation sigma. | |
% mu : mean | |
% sigma : standard deviation | |
% Generate Laplacian noise | |
u = rand(1, 1)-0.5; | |
b = sigma / sqrt(2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment