About 50 results
Open links in new tab
  1. Generate a random number in a certain range in MATLAB

    Feb 22, 2011 · Type help rand in MATLAB ... "returns an N-by-N matrix containing pseudorandom values drawn from the standard uniform distribution on the open interval (0,1). " The bigger reason …

  2. Using rand in matlab to produce numbers between limits

    Jun 21, 2011 · Is there a way in Matlab using the pseudo number generator to generate numbers within a specific range? I want to get 20 random integer numbers between -10 and 10 and I thought of …

  3. Random Numbers with Gaussian and Uniform Distributions in matlab

    Oct 20, 2018 · I want generate a number in Gaussian and Uniform distributions in matlab. I know this function randi and rand() but all of them are in normal (Gaussian) distribution. How can a generate a …

  4. Generate random number with given probability matlab

    Dec 17, 2012 · Randomly sample r from 0..1 using rand. In this case I put my data into a column vector. Put the probabilities for each output index into p. r >= cumsum(p) compares every combination of r …

  5. Random number generator between two numbers - MatLab

    Dec 3, 2014 · I am trying to create a random number generator between two numbers in MatLab but I am unable to figure out the correct equation. I know that you can use the rand() function to create …

  6. Generate 1 random number between -1 and 1 in Matlab

    I am new to matlab and I need to add one random number between -1 and 1 to the equation. I also need to generate a random number between -5 and 5. I need float number not int

  7. matlab - How to generate random numbers from a normal distribution …

    Mar 4, 2018 · I need to generate a Gaussian random sample of n numbers, with mean 0 and variance 1, using the randn function. In general, how would I generate a Gaussian random sample X of n …

  8. Random numbers using rand() in matlab - Stack Overflow

    Aug 7, 2018 · I am using Matlab function round (rand (256)) to create a square matrix of size 256x256 with random distribution of 0s and 1s. What I specifically want to do is that I want to somehow specify …

  9. Is it possible to reproduce randn () of MATLAB with NumPy?

    The user asked if it was possible to reproduce the output of randn () of Matlab, not rand. I have not been able to set the algorithm or seed to reproduce the exact number for randn (), but the solution below …

  10. How to set custom seed for pseudo-random number generator

    Jan 13, 2011 · I need to perform few tests where I use randn pseudo random number generator. How can I set the seed on my own, so every time I run this test I will get the same results? (yeah, I know …