How to find the derivative without using a symbolic function in Matlab?

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

Was this solution helpful to you?

Find solution

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.