Modelling a Bivariate Normal Distribution in Matlab

579 Views Asked by At

Hi I was wondering would anyone have experience with modelling multiple bi-variate Gaussian distributions on the same plane in Matlab?

Say we know the coordinates of the means, let m1 = mean1= [1 2] m2 = mean2=[9 3] m3 = mean3= [11 5]

I am looking to generate a bi-variate Gaussian distribution from the x and y axis using the above values as coordinates for each mean means

Any help at all is much appreciated,

Thank You

1

There are 1 best solutions below

0
On

There is some information missing in your question: in order to generate data from a multivariate (or single variate) Gaussian distribution, you must have both the mean and the covariance (or just variance in the uni-variate case) of the distribution. Once you have those, generating data from Matlab is by: $$D = mvnrnd(\mu, \Sigma, n)$$ Were $\mu$ is the mean vector, $\Sigma$ is the covariance matrix, and $n$ is the number of observations you wish to generate. The above line of code will generate $D\in \mathbb{R}^{n \times p}$ where $p$ is the distribution dimension, in your case 2. If you specify $\Sigma$ and need some more help, let me know.