function splitWells(culture)

%genFullRecNoWaveformNoClean(culture);

fpath = ['C:\Users\USER\Documents\mingfaifong\' culture '\' culture '_FullRecNoWaveformNoClean.mat'];
spath = ['C:\Users\USER\Documents\mingfaifong\' culture '\'];

load(fpath, '-mat')

w(1,:) = [3 4 5 12 13 20 21 28 29];
w(2,:) = [7 14 15 16 22 23 24 30 31];
w(3,:) = [38 39 40 46 47 48 55 56 63];
w(4,:) = [36 37 44 45 52 53 60 61 62];
w(5,:) = [34 35 41 42 43 49 50 51 58];
w(6,:) = [2 9 10 17 18 19 25 26 27];

tempTime = time;
tempChannel = channel;
tempUnit = unit;

for i = 1:6
    time = tempTime(ismember(tempChannel, w(i,:))==1);
    channel = tempChannel(ismember(tempChannel, w(i,:))==1);
    unit = tempUnit(ismember(tempChannel, w(i,:))==1);
    
    wellID = char(double('a') + (i-1));
    save([spath culture '_FullRecNoWaveformNoClean_Well' wellID], 'time', 'channel', 'unit');
end

end