function Scatter = fake_ssm(x,seed) % Fake SSM {B2,S1}-scatter generation. No tree structure produced. % USAGE: % Scatter = fake_ssm(x) % X - the input vector of parameters, dim: 6x1: % X(1) - number of samples for B2 scatter % X(2) - number of samples for S1 scatter % X(3) - mean of the normal distribution of B2 samples % X(4) - std of the normal distribution of B2 samples % X(5) - mean of the normal distribution of S1 samples % X(6) - std of the normal distribution of S1 samples % Scatter - the fake scatter corresponding to one Branch and one Segment % table. % % See also: rng, randn, rand s = rng;% remember rng state % Fix RNG state if (nargin < 2) rng(543); elseif (nargin == 2) rng(seed); end % Generate the fake data Scatter = {x(3) + x(4)*randn(5,x(1)), x(5) + x(6)*randn(4,x(2))}; rng(s);% restore the rng state end