MATLAB Please help me with Gaussian Distribution and central limit theorem in matlab

AI Thread Summary
To generate a random variable with an approximate Gaussian distribution in MATLAB, use the `randn` function instead of `rand`, as `randn` produces numbers with a mean of 0 and a standard deviation of 1. To adjust the parameters for your Gaussian distribution, you can use element-wise multiplication, such as `5 + 2.*randn(6,6)` for a mean of 5 and a standard deviation of 2. For graphing the distribution of generated values, utilize MATLAB's plotting functions to visualize both the generated data and the theoretical Gaussian distribution. Additionally, when dealing with a Gaussian amplitude distribution, the instantaneous power will follow a Chi-squared distribution. Providing your existing code can help others give more specific guidance on your issues.
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.
 
Back
Top