"John D'Errico" <woodchips@rochester.rr.com> wrote in message <gsv079$nag$1@fred.mathworks.com>...
> "Sid Hayes" <sid.hayes@hotmail.com> wrote in message <gsuqlb$3gp$1@fred.mathworks.com>...
> > Hi,
> >
> > I am trying to create a specific RNG.
> >
> > using values: un =064265094
> > cn =656992
> > tn =1064265094
> >
> > my RNg will be: I(n+1)=[cn*I(n) + un*I(n1)]*(tn)
>
> Hmm. Since all of these numbers are positive, do
> you expect that I will grow without bound? (I
> hope you will say yes.)
>
> What is the largest number you can represent in
> MATLAB as an exact integer? (If these are doubles,
> you can up to 2^53).
>
> Is your formula correct if you will expect these
> numbers to stay bounded? (No.)
>
> Should there be some form of modulo operator
> in there? (One would imagine so.)
>
> John
Hi
Firstly, thanks for the reply!!
I think there is meant to be a modulo operator in there.
I was trying to bound the formula, so the function (I) would not increase as more random numbers are generated.
After, the random numbers are produced, these will then be coverted to binary numbers by using: bn = 0 if 0<Rn<0.5
= 1 if 0.5<Rn<1
Hope this can help.
Kind Regards
Sid
