-1

I look for develop by my own a cloud of points with a density which is a Gaussian.

I find a first solution, but I would like to make it by my own.

X = [mvnrnd([x_centroid,y_centroid],[diameter 0; 0 diameter],number_points)] 

Have you an idea ?

gpbdr13
  • 115
  • 9
  • 1
    mmm... So you have a fucntion and you want to make your own function that does the same thing? What is the purpose? Wat have you tried? – Ander Biguri May 05 '17 at 08:19

1 Answers1

1

You can get gaussian random values from:

x = meanval + sigma*randn(N, 1);

If you get several vectors like x, it would be a gaussian cloud.

Or you can convert it from even distribution: Converting a Uniform Distribution to a Normal Distribution

Community
  • 1
  • 1
Sairus
  • 384
  • 1
  • 15
  • How can I get a 2D gaussian random value ? I would get a vector X=[x,y] with a hist3 that is gaussian – gpbdr13 May 09 '17 at 07:21