function [ x ] = fake_data(mu, sig, n)
%
% Generates a set of data almost matching mu, sigma
satisfactory = false;
count = 0;
while ~satisfactory & count<10000
count = count + 1;
x=normrnd(mu,sig*(n-1)/n,n,1);
[mu2, sig2] = normfit(x);
error_mu = abs((mu2-mu)/mu);
error_sig = abs((sig2-sig)/sig);
satisfactory = error_mu<0.01 & error_sig<0.01;
end
if ~satisfactory
disp('More than 10000 iterations taken... no values to returnsolution')
end
end