No BSD License  

Highlights from
Gaussian Random Samples Generation

4.9

4.9 | 10 ratings Rate this file 22 Downloads (last 30 days) File Size: 3.97 KB File ID: #6028
image thumbnail

Gaussian Random Samples Generation

by John Shell

 

10 Oct 2004 (Updated 12 Oct 2004)

Generates 2-dimensional gaussian samples.

| Watch this File

File Information
Description

randgen(mu,mu1,mu2,cov1,cov2,cov3) = Random generation of Gaussian Samples in d-dimensions where d = 2
mu, mu1, mu2 = (x,y) coordinates(means) that the gaussian samples are centered around. cov1, cov2, cov3 are the covariance matrices and will vary changing the shape of the distribution, example: cov = sigma^2*Identity Matrix, where sigma^2 = a scalar. N = the number of gaussian samples used and are provided as user input. A test set of N/2 and a training set of N/2 gaussian samples is also generated. Output is directed to the command window and a plot of the distributions are generated.

example1: randgen([4 5],[9 0;0 9],[10 15],[6 0;0 6],[15 10],[4 0;0 4]) or

example2: randgen([4 5],[9, 0; 0 9],[10 15],[5, 1.5; 1, 5.5],[15 10],[6, -1; -1, 4])

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Multivariate Gaussian Distribution

MATLAB release MATLAB 7 (R14)
Other requirements Matlab Release 14
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (11)
04 Nov 2004 Kevin Tsu

Excellent code, thank you!

24 Dec 2005 Ganesh Upadhyaya

efficient code

11 Mar 2006 Ahmet Hungari

Looks great!

27 Jun 2006 Walter Stern

Great work! Thanks!

10 Oct 2006 Bob Weir

Great coding, thanks

29 Dec 2006 SungMin Kim

That's good!

08 Mar 2007 Su Shi

Awsome. A job welldone

16 Jul 2007 Sel Hdez

Excellent

25 Oct 2007 mahmood naderan

Thank you

30 Dec 2007 bon felips

perfect

13 Jul 2009 kiriti gowda

does this work on mathlab 6.5

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
statistics John Shell 22 Oct 2008 07:32:50
probability John Shell 22 Oct 2008 07:32:50
samples John Shell 22 Oct 2008 07:32:50
gaussian John Shell 22 Oct 2008 07:32:50
gaussian Matteo Ballancin 04 Nov 2008 04:22:01
probability Matteo Ballancin 04 Nov 2008 04:22:02
samples ismail 11 Mar 2010 18:39:39
gaussian derya erdogan 25 Jan 2011 10:56:43
probability brat xatz 17 Oct 2011 07:51:29
gaussian brat xatz 17 Oct 2011 07:51:33
gaussian Robin 31 Oct 2011 22:12:34

Contact us at files@mathworks.com