"Elnaz " <email@example.com> wrote in message news:firstname.lastname@example.org... > Hi all, > I am running several MATLAB in parallel and I want to have my script > running on several machines generate the same random numbers. To do this, > I am doing rng('default'); Is this the same as doing: > rand('state',0); % set state to 0
No, and you probably shouldn't be doing the latter if you can avoid it.
> In other worsd, is the default setting '0'?
No. See the page linked in the Note at the top of the Description section for a more thorough explanation of what rng('default') is doing and why we discourage the rand(string, seedValue) and randn(string, seedValue) syntaxes.