MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayNew to MATLAB?
MATLAB Central > MATLAB Newsreader > gamma random function 

I am trying to create a repeatable gamma random function but i cannot figure out how it's done. i've tried gamrnd and randg but neither seem to work. (I also can't use randg because i need to set the scale param to 2 but it only allows the shape param to vary). I already have repeating sequences for rand, randn, and randi but can't figure out if it's possible with gamrnd. i implemented the following code which is repeatable for the 1st 3 functions. any help is appreciated. 
"David " <david.j.ellis@saic.com> wrote in message <i6tr60$bqp$1@fred.mathworks.com>... 
"Rogelio " <rogelioa@math.uio.no> wrote in message <i6tu2b$gu1$1@fred.mathworks.com>... 
"David " <david.j.ellis@saic.com> wrote in message <i6tr60$bqp$1@fred.mathworks.com>... 
> Presumably all you need to do is set some fixed seed you have chosen for either rand or else randn (I don't know which) just prior to generating the sequence of gammarnd quantities to make them repeat the same sequence of values. Of course that presupposes that other differing uses of rand or randn do not intervene during such a generation sequence. 
"David " <david.j.ellis@saic.com> wrote in message <i6ud7h$qm0$1@fred.mathworks.com>... 

On 9/17/2010 6:04 AM, Rogelio wrote: 
Peter Perkins <Peter.Perkins@MathRemoveThisWorks.com> wrote in message <i70v6g$923$1@fred.mathworks.com>... 
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.