Generating Gaussian distribution with central limit theorem in Matlab

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 7K views
blgna2
Messages
4
Reaction score
0
please help me with Gaussian Distribution and central limit theorem in matlab!

:cry:I am trying to generate a random variable with a approximate gaussian distribution using the rand function and central limit theorem, got stuck when trying it. Please help me. Also want to know how to produce a graph showing the distribution of the values the
program generates and the graph of a Gaussian distribution.
If a signal has a Gaussian amplitude distribution, what is the distribution of the instantaneous power? Graph the power distribution generated using the Central Limit Theorem.

Help me!:cry::confused:
 
Physics news on Phys.org


Dear please provide the code you have developed till now so I can see what changes you should make or what you should add...
 


How can we know where you are stuck?

By simply guessing, maybe you are having problems with rand, that's a uniform distribution, try randn which will give you Gaussian with mean 0 and sd 1. You can element-wise multiply to adjust the parameters, eg 5 + 2.*randn(6,6) will give you a 6x6 matrix of Gaussian random numbers, each with mean 5 and standard deviation 2.