Is MATLAB's Randomization Function Affected by Appending Numbers to Student IDs?

  • Thread starter Thread starter emergentecon
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
emergentecon
Messages
57
Reaction score
0

Homework Statement



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?

Homework Equations



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

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
 
Physics news on Phys.org
Yeah, that is the exact version I am using . . . cool, will look into it!
I have emailed my Prof. (included your post) :)

Thanks!