Note:RandStream.setDefaultStream has been removed.
Use RandStream.setGlobalStream instead.
The shared global stream used by rand, randi, and randn,
referred to in former versions of MATLAB® as the default
stream is now referred to as the global stream.
prevstream = RandStream.setDefaultStream(stream)
prevstream = RandStream.setDefaultStream(stream) returns
the current global random number stream, and designates the random
number stream stream as the new random number stream
to be used by the rand, randi, and randn functions.