    %%
    % create data set that avg the 4sec data over sesstions
    % @ori  channel *4sec *6epoch, ex: 256*1024*6
    % @out  channel *4sec        , ex: 256*1024
   
    %% sbj1_75_9hz Channel_Data;
    clear all;
    EEG1 = pop_loadset('sbj1_sessitonA10.set');
    EEG2 = pop_loadset('sbj1_sessitonB2.set');
    EEG3 = pop_loadset('sbj1_sessitonC3.set');
    EEG4 = pop_loadset('sbj1_sessitonD5.set');  
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,1:EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,1:EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG3.nbchan length(EEG3.data(1,:,1:EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_75_9hz Channel_Data;
    
    %% sbj1_75_10hz Channel_Data;
    clear all;
    
    EEG1 = pop_loadset('sbj1_sessitonA3.set');
    EEG2 = pop_loadset('sbj1_sessitonB4.set');
    EEG3 = pop_loadset('sbj1_sessitonC1.set');
    EEG4 = pop_loadset('sbj1_sessitonD10.set');  
    %EEG1.trials = 6;
    
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG3.nbchan length(EEG3.data(1,:,EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_75_10hz Channel_Data;
    
    %% sbj1_75_11hz Channel_Data;
    clear all;
    
    EEG1 = pop_loadset('sbj1_sessitonA7.set');
    EEG2 = pop_loadset('sbj1_sessitonB5.set');
    EEG3 = pop_loadset('sbj1_sessitonC9.set');
    EEG4 = pop_loadset('sbj1_sessitonD6.set'); 
    %EEG1.trials = 6;
     
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG3.nbchan length(EEG3.data(1,:,EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_75_11hz Channel_Data;
    
     %% sbj1_75_12hz Channel_Data;
    clear all;
    
    EEG1 = pop_loadset('sbj1_sessitonA4.set');
    EEG2 = pop_loadset('sbj1_sessitonB10.set');
    EEG3 = pop_loadset('sbj1_sessitonC5.set');
    EEG4 = pop_loadset('sbj1_sessitonD1.set');
    %EEG1.trials = 6;
      
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG3.nbchan length(EEG3.data(1,:,EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_75_12hz Channel_Data;
    
     %% sbj1_75_13hz Channel_Data;
    clear all;
    EEG1 = pop_loadset('sbj1_sessitonA2.set');
    EEG2 = pop_loadset('sbj1_sessitonB3.set');
    EEG3 = pop_loadset('sbj1_sessitonC4.set');
    EEG4 = pop_loadset('sbj1_sessitonD2.set');
    %EEG1.trials = 6;
      
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG3.nbchan length(EEG3.data(1,:,EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_75_13hz Channel_Data;
    
     %% sbj1_120_9hz Channel_Data;
    clear all;
    EEG1 = pop_loadset('sbj1_sessitonA8.set');
    EEG2 = pop_loadset('sbj1_sessitonB6.set');
    EEG3 = pop_loadset('sbj1_sessitonC10.set');
    EEG4 = pop_loadset('sbj1_sessitonD7.set');
    %EEG1.trials = 6;
      
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG3.nbchan length(EEG3.data(1,:,EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_120_9hz Channel_Data;
    
     %% sbj1_120_10hz Channel_Data;
    clear all;
    EEG1 = pop_loadset('sbj1_sessitonA1.set');
    EEG2 = pop_loadset('sbj1_sessitonB8.set');
    EEG3 = pop_loadset('sbj1_sessitonC6.set');
    EEG4 = pop_loadset('sbj1_sessitonD4.set');
    %EEG1.trials = 6;
      
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG1.nbchan length(EEG3.data(1,:,EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_120_10hz Channel_Data;
    
    %% sbj1_120_11hz Channel_Data;
    clear all;
    EEG1 = pop_loadset('sbj1_sessitonA6.set');
    EEG2 = pop_loadset('sbj1_sessitonB1.set');
    EEG3 = pop_loadset('sbj1_sessitonC8.set');
    EEG4 = pop_loadset('sbj1_sessitonD3.set'); 
    %EEG1.trials = 6;
     
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG3.nbchan length(EEG3.data(1,:,EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_120_11hz Channel_Data;
    
    %% sbj1_120_12hz Channel_Data;
    clear all;
    EEG1 = pop_loadset('sbj1_sessitonA9.set');
    EEG2 = pop_loadset('sbj1_sessitonB7.set');
    EEG3 = pop_loadset('sbj1_sessitonC2.set');
    EEG4 = pop_loadset('sbj1_sessitonD8.set'); 
    %EEG1.trials = 6;
     
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG3.nbchan length(EEG3.data(1,:,EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_120_12hz Channel_Data;
    
    %% sbj1_120_13hz Channel_Data;
    clear all;
    EEG1 = pop_loadset('sbj1_sessitonA5.set');
    EEG2 = pop_loadset('sbj1_sessitonB9.set');
    EEG3 = pop_loadset('sbj1_sessitonC7.set');
    EEG4 = pop_loadset('sbj1_sessitonD9.set');  
    %%EEG1.trials = 6;
    
    % avg the epoches for each sesstion
    %sesstionA
    dataSesstion1 =  zeros([EEG1.nbchan length(EEG1.data(1,:,EEG1.trials))]);%initial the data_temp
    for channel=1:EEG1.nbchan%for each channel
        for i=1:EEG1.trials%for each epoche
            dataSesstion1(channel,:) = dataSesstion1(channel,:)+EEG1.data(channel,:,i);%sum each epoche
        end
        dataSesstion1(channel,:) = dataSesstion1(channel,:)/EEG1.trials;%get the average over epoches
    end
    
    %sesstionB
    dataSesstion2 =  zeros([EEG2.nbchan length(EEG2.data(1,:,EEG2.trials))]);%initial the data_temp
    for channel=1:EEG2.nbchan%for each channel
        for i=1:EEG2.trials%for each epoche
            dataSesstion2(channel,:) = dataSesstion2(channel,:)+EEG2.data(channel,:,i);%sum each epoche
        end
        dataSesstion2(channel,:) = dataSesstion2(channel,:)/EEG2.trials;%get the average over epoches
    end
    
    %sesstionC
    dataSesstion3 =  zeros([EEG3.nbchan length(EEG3.data(1,:,EEG3.trials))]);%initial the data_temp
    for channel=1:EEG3.nbchan%for each channel
        for i=1:EEG3.trials%for each epoche
            dataSesstion3(channel,:) = dataSesstion3(channel,:)+EEG3.data(channel,:,i);%sum each epoche
        end
        dataSesstion3(channel,:) = dataSesstion3(channel,:)/EEG3.trials;%get the average over epoches
    end
    
    %sesstionD
    dataSesstion4 =  zeros([EEG4.nbchan length(EEG4.data(1,:,EEG4.trials))]);%initial the data_temp
    for channel=1:EEG4.nbchan%for each channel
        for i=1:EEG4.trials%for each epoche
            dataSesstion4(channel,:) = dataSesstion4(channel,:)+EEG4.data(channel,:,i);%sum each epoche
        end
        dataSesstion4(channel,:) = dataSesstion4(channel,:)/EEG4.trials;%get the average over epoches
    end
    
    %avg cross sesstions
    for channel=1:EEG1.nbchan%for each channel
        dataSesstion1to4(channel,:) = (dataSesstion1(channel,:)+dataSesstion2(channel,:)+dataSesstion3(channel,:)+dataSesstion4(channel,:))/4;
    end
    Channel_Data = dataSesstion1to4;%format: channel*(4sec data)
    save sbj1_120_13hz Channel_Data;