%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Script to generate test data consisting random string of various length for compressor test
%
% April 9, 2015
% Author: Poh Hou Shun, Centre for Quantum Technologies, National University of Singapore
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% defining array of length of strings
%LIST_SIZE = 1;
%for i  = 2:8
%    LIST_SIZE(i) = LIST_SIZE(i - 1)*10;
%end;

% emptying first to third element
%LIST_SIZE(1:3) = [];

LIST_SIZE_INDEX = 3:0.1:7;
LIST_SIZE = ceil(10.^LIST_SIZE_INDEX);

for i = 1:length(LIST_SIZE)
    
    LIST_SIZE(i)

    % generating string of random number with length LIST_SIZE(i)
    rand_list = round(rand(LIST_SIZE(i), 1));
    
    % writing generated string to file
    dlmwrite(strcat(num2str(LIST_SIZE(i)), '_output.dat'), rand_list', '');

end;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
