0

I am working on a feed-forward neural network analysis using MATLAB. I am getting the following error:

Undefined function or variable 'setdemorandstream'.

Code is as follows:

setdemorandstream(391418381);

Any help in rectifying this error is appreciated.

Dev-iL
  • 23,742
  • 7
  • 57
  • 99
Aditya
  • 93
  • 2
  • 12

1 Answers1

1

These are the contents of the function, verbatim:

function setdemorandstream(n)
%SETDEMORANDOMSTREAM Set default stream for reliable example results.
%
%  SETDEMORANDOMSTREAM(N) is less distracting in example code, but
%  equivalent to:
%
%    rs = RandStream('mcg16807','Seed',n);
%    RandStream.setGlobalStream(rs);

% Copyright 2011-2012 The MathWorks, Inc.

rs = RandStream('mcg16807','Seed',n);
RandStream.setGlobalStream(rs);

Just save this as a file in your MATLAB path.

However, your errors might not stop there - make sure you have the neural network toolbox installed.

Dev-iL
  • 23,742
  • 7
  • 57
  • 99
  • Thank you! this worked. And yes thank you for your prior attention on the neural network toobox – Aditya Mar 24 '17 at 17:23