From: Jeff on
Some code that I'm working on has the following line:

rand('state',sum(100*clock))

The editor issues a warning which says "Using character strings to control RAND is deprecated. I need to understand that line, but the help on rand (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/randstream.rand.html) does not give any information on the deprecated parms. Does anyone know where I can find info on the deprecated uses? Thanks,
-Jeff
From: ImageAnalyst on
On Dec 5, 12:59 pm, "Jeff " <spREMOVEHITSjef...(a)SIGNoptonline.net>
wrote:
> Some code that I'm working on has the following line:
>
> rand('state',sum(100*clock))
>
> The editor issues a warning which says "Using character strings to control RAND is deprecated. I need to understand that line, but the help on rand (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/randstream....) does not give any information on the deprecated parms. Does anyone know where I can find info on the deprecated uses? Thanks,
> -Jeff

-----------------------------------------------
How about you just say what you WANT to do and let's go from there?

Most people only have one or two versions on MATLAB on their computer
and may not have a version old enough for you.
From: Jeff on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <f705b4ff-7356-4a88-9378-38cf63e27b5a(a)31g2000vbf.googlegroups.com>...
> On Dec 5, 12:59?pm, "Jeff " <spREMOVEHITSjef...(a)SIGNoptonline.net>
> wrote:
> > Some code that I'm working on has the following line:
> >
> > rand('state',sum(100*clock))
> >
> > The editor issues a warning which says "Using character strings to control RAND is deprecated. I need to understand that line, but the help on rand (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/randstream....) does not give any information on the deprecated parms. Does anyone know where I can find info on the deprecated uses? Thanks,
> > -Jeff
>
> -----------------------------------------------
> How about you just say what you WANT to do and let's go from there?
>
> Most people only have one or two versions on MATLAB on their computer
> and may not have a version old enough for you.

Unfortunately, that is what I want to do. This is a project for school. I have been given the code above and one of the questions is: What role does rand play?

I am to answer that question and then I may have to modify the code (although that's unlikely). I would ask my professor the question, but he is incommunicado this weekend (see what I get by waiting until last minute?) - and he doesn't really answer questions, anyway. That's why I asked the question the way I did.

I am going to modify the program to implement a card counting Monte Carlo simulation. It's true that I probably won't have to modify the randomization line, but I still must answer the question.

Once again, thank you,
-Jeff
From: Jeff on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <f705b4ff-7356-4a88-9378-38cf63e27b5a(a)31g2000vbf.googlegroups.com>...
> On Dec 5, 12:59?pm, "Jeff " <spREMOVEHITSjef...(a)SIGNoptonline.net>
> wrote:
> > Some code that I'm working on has the following line:
> >
> > rand('state',sum(100*clock))
> >
> > The editor issues a warning which says "Using character strings to control RAND is deprecated. I need to understand that line, but the help on rand (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/randstream....) does not give any information on the deprecated parms. Does anyone know where I can find info on the deprecated uses? Thanks,
> > -Jeff
>
> -----------------------------------------------
> How about you just say what you WANT to do and let's go from there?
>
> Most people only have one or two versions on MATLAB on their computer
> and may not have a version old enough for you.

OK, this might be a better answer to your question "what do I want to do?"

The random number generator is used later on in the program like this:

deck = deck(randperm(ncards));

where ncards is a scalar indicating the number of cards in the deck (e.g., 52 if we use just one deck).
From: Bruno Luong on
I believe the purpose of this line is to make sure the subsequent random generations are differences from run to run. It starts the random *seed* with the current time, so the seeds will never repeated.

Bruno