No License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Laplacian random number generator

4.6 | 7 ratings Rate this file 44 Downloads (last 30 days) File Size: 714 Bytes File ID: #13705 Version: 1.0

Laplacian random number generator


Elvis Chen (view profile)


18 Jan 2007 (Updated )

Generate i.i.d. random number drawn from laplacian distribution with specified parameter

| Watch this File

File Information

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

Required Products Statistics and Machine Learning Toolbox
MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
21 Sep 2016 Alex

Alex (view profile)


06 May 2014 Li Dong

Li Dong (view profile)

23 Jul 2009 Chetan Mandaliya

Dear U helped very much. I got what i was doing for 2 days. Thank you very much

11 Apr 2008 Nishank Pathak


02 Sep 2007 Osman Gulseven

Does the Job

02 May 2007 Abdellatif Salah

well done

19 Jan 2007 John D'Errico

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.

Contact us