# MATLAB Simple Randomization

1. Mar 14, 2014

### emergentecon

1. The problem statement, all variables and given/known data

Enter the following two commands, and copy and paste the output as your answer
> rand("state",student_number0917);
> rand(1)
where student_number0917 is your student number with "0917" at the end and with "-" removed.
For example, if your student number is 123-456-7, you would enter
> rand("state",12345670917);
> rand(1)

The problem is, we need to do this for each new assignment, and for each new assignment, we append a new number: 0917 (in this instance), then 0913, 0920, 0911 etc.

However, I always get the same result, no matter what number I append?
Am I missing something?

2. Relevant equations

> rand("state",1234567????);
> rand(1)

3. The attempt at a solution

>> clc; clear;
>> rand('state',312754190917)
>> rand(1)

ans =

0.662733934182293

OR

>> clc; clear;
>> rand('state',312754190913)
>> rand(1)

ans =

0.662733934182293

2. Mar 14, 2014

### jbunniii

3. Mar 15, 2014

### emergentecon

Yeah, that is the exact version I am using . . . cool, will look into it!
I have emailed my Prof. (included your post) :)

Thanks!