clear all 
clc

subject_data_2D = load('Subject_AG_badchannelremoval epochs_baseline_filter0.5to25HZ.txt');
subject_data_3D = permute(reshape(subject_data_2D, 768, 60, 23), [1 3 2])
%save('20150521165733_Actual_AG_filtered0p5to45hz.mat','subject_data_3D')
%subject_data_2D(770,3)
%subject_data_3D(2,3,2)
for epoch=1:60
    subjData_epoch=subject_data_3D(:,:,epoch);
    correlation_factor=corrcoef(subjData_epoch); %
    mycc_all_epoch(:,:,epoch)=correlation_factor;
end
 
%save('20150527190502_Actual_SM_3D_correlation.mat','mycc_all_epoch')
 
     
mycc_allSubj_2D=reshape(mycc_all_epoch,529,60)
final_mycc_allSubj_2D = round(mycc_allSubj_2D,9)

