participant_number = {'20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33' '34', '35'};
filepath = ['/home/marius/Schreibtisch/S'];% participant_number{1} '/SEA/'];
poiss_file = '/SEA/Poiss_ITI.txt';
order_file = '/SEA/agent_order.txt';
lamda = 1.3;

for g = 1:length(participant_number)
    poisson_vec = poissrnd(lamda, 1, 160)*700;
    
    
    flat_noise = unidrnd(1000, 1, 160) + 2200;
    poisson_vec_noise = poisson_vec + flat_noise;
    %figure;
    %hist(poisson_vec_noise);
    
    if ~isdir([filepath participant_number{g} '/SEA'])
        mkdir([filepath participant_number{g} '/SEA'])
    end
    
    dlmwrite([filepath  participant_number{g}  poiss_file], poisson_vec_noise');
    
    agent_order = randperm(7, length(1:7));
    
    
    dlmwrite([filepath participant_number{g}  order_file], agent_order');
%     subplot(length(participant_number)/2, length(participant_number)/2, g)
%     histogram(poisson_vec_noise); 
%     legend{g} = 'participant_number{g}';
end
, ''