Is there anyway to generate Gaussian samples with the rand function for Matlab?( Without using randn)?
-
I wish to simulate the 'randn' function in Matlab using only the 'rand' function but cannot seem to get it to work. I wonder if it may hav something to do with the central limit theorem?
-
Answer:
It can be done. I TA'd for a class, and one of the problems on a problem set instructed on how to do this. If you want the distribution to look like a standardized gaussian you can generate random numbers using rand that are between -3 and 3. The standardized gaussian basically gives non zero probability between -3 and 3. You need to generate a lot of random numbers. Your vector of random numbers should be length 1000 or greater, and each element should be the sum of 1000 or more random numbers between -3 and 3. The resulting histogram will look like a gaussian given a small enough bin size, try .2 for bin size, and this is because of the central limit theorem.
Michael H at Yahoo! Answers Visit the source
Related Q & A:
- How do I downgrade my Darth Vader slim PSP without using an old PSP battery and/or opening the PSP slim batt?Best solution by Yahoo! Answers
- How can I sell something on ebay without using a credit card?Best solution by Yahoo! Answers
- How do I overcome depression without using medication?Best solution by Yahoo! Answers
- How can I email a photo on Yahoo email without using an attachment?Best solution by Yahoo! Answers
- What is the Command to Minimize Windows and Maximize Windows without using the mouse?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.