MATLAB: RandStream​.getGlobal​Stream not working

randstream; getglobalstream

Hello,
I have a question about getting Global stream. I have tried below code, But It is not working –
% Get the globalStream
globalStream = RandStream.getGlobalStream;
Error – No appropriate method, property, or field getGlobalStream for class RandStream.
I am using Matlab R2010a. Kindly suggest.
Thanks in Advance.

Best Answer

RandStream.getDefaultStream is needed from the time RandStream was introduced until R2010b, which introduced getGlobalStream