
animal = 'P03';

recordings = {'_01_ACQ'; '_02_STM'; '_03_LTM'};

media_alfa1 = zeros(3,31,6);
media_alfa2 = media_alfa1;

media_beta1 = media_alfa1;
media_beta2 = media_alfa1;

for rec = 1:3
    recording = [animal recordings{rec}];
    extracting_variables;
    
    media_alfa1(rec,:,:) = squeeze(mean(relative1(:,:,:,1),1));
    media_alfa2(rec,:,:) = squeeze(mean(relative2(:,:,:,1),1));

    media_beta1(rec,:,:) = squeeze(mean(relative1(:,:,:,2),1));
    media_beta2(rec,:,:) = squeeze(mean(relative2(:,:,:,2),1));
    
    print_exploration_subject(t_epoch(n1)-500, 20*log10(media_alfa1), 20*log10(media_alfa2),1)
    print_qtpdf([animal '_beta_sujeto.pdf'])
    print_exploration_subject(t_epoch(n1)-500, 20*log10(media_beta1), 20*log10(media_beta2),2)
    print_qtpdf([animal '_alfa_sujeto.pdf'])
    
    save ([recording '_mat.mat'], 'relative1' , 'relative2')
end