11 Downloads
Updated 18 Jan 2007
No License
function y = laprnd(m, n, mu, sigma)
%LAPRND generate i.i.d. laplacian random number drawn from laplacian distribution
% with mean mu and standard deviation sigma.
% mu : mean
% sigma : standard deviation
% [m, n] : the dimension of y.
% Default mu = 0, sigma = 1.
% For more information, refer to
% http://en.wikipedia.org./wiki/Laplace_distribution
Elvis Chen (2021). Laplacian random number generator (https://www.mathworks.com/matlabcentral/fileexchange/13705-laplacian-random-number-generator), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Thanks Man!!
cool
Dear U helped very much. I got what i was doing for 2 days. Thank you very much
Thanks
Does the Job
well done
It does what it says. Its vectorized, well coded, with good help, some error checks (ok, it does not check for sigma<0, nor worry about the shapes of its arguments), it has default values for the parameters, an H1 line, a reference to wikipedia. These are all things I like very much to see.
In my obsessive drive for completeness, I'd want to see also tools for the pdf, cdf, and inverse cdf. I wanted to rate this about a 4.5 as is.