Commit b1ad31cf authored by MichelJuillard's avatar MichelJuillard
Browse files

removed seeding random generators from clock in cmaes and metropolis hastings

parent 6b3bd9dd
...@@ -644,11 +644,11 @@ else % flgresume ...@@ -644,11 +644,11 @@ else % flgresume
end end
% initialize random number generator % initialize random number generator
if ischar(opts.Seed) % $$$ if ischar(opts.Seed)
randn('state', eval(opts.Seed)); % random number generator state % $$$ randn('state', eval(opts.Seed)); % random number generator state
else % $$$ else
randn('state', opts.Seed); % $$$ randn('state', opts.Seed);
end % $$$ end
%qqq %qqq
% load(opts.SaveFilename, 'startseed'); % load(opts.SaveFilename, 'startseed');
% randn('state', startseed); % randn('state', startseed);
......
...@@ -180,9 +180,6 @@ if ~options_.load_mh_file && ~options_.mh_recover ...@@ -180,9 +180,6 @@ if ~options_.load_mh_file && ~options_.mh_recover
% separate initializaton for each chain % separate initializaton for each chain
JSUM = 0; JSUM = 0;
for j=1:nblck, for j=1:nblck,
JSUM = JSUM + sum(100*clock);
randn('state',JSUM);
rand('state',JSUM);
record.Seeds(j).Normal = randn('state'); record.Seeds(j).Normal = randn('state');
record.Seeds(j).Unifor = rand('state'); record.Seeds(j).Unifor = rand('state');
end end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment