
%% TTX vs. ctrl
load('C:\Users\mingfaifong\Documents\Upscaling Paper\cultureID_TTXvsCtrl.mat');
clear waveform
waveform.ctrl = [];
waveform.TTX = [];
for i = 1:length(cultureID.ctrl)
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.ctrl{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.ctrl{i}},[length(curr),1]);
    waveform.ctrl = [waveform.ctrl; curr];
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.TTX{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.TTX{i}},[length(curr),1]);
    waveform.TTX = [waveform.TTX; curr];
end


%% TTX vs. TTX+CTZ ctrl
clear;
load('C:\Users\mingfaifong\Documents\Upscaling Paper\cultureID_TTXvsTTXCTZvsCtrl.mat');
clear waveform
waveform.ctrl = [];
waveform.TTX = [];
waveform.TTXCTZ = [];
for i = 1:length(cultureID.ctrl)
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.ctrl{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.ctrl{i}},[length(curr),1]);
    waveform.ctrl = [waveform.ctrl; curr];
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.TTX{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.TTX{i}},[length(curr),1]);
    waveform.TTX = [waveform.TTX; curr];
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.TTXCTZ{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.TTXCTZ{i}},[length(curr),1]);
    waveform.TTXCTZ = [waveform.TTXCTZ; curr];
end


%% CNQX vs. ctrl
clear;
load('C:\Users\mingfaifong\Documents\Upscaling Paper\cultureID_CNQXvsCtrl.mat');
clear waveform
waveform.ctrl = [];
waveform.CNQX = [];
for i = 1:length(cultureID.ctrl)
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.ctrl{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.ctrl{i}},[length(curr),1]);
    waveform.ctrl = [waveform.ctrl; curr];
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.CNQX{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.CNQX{i}},[length(curr),1]);
    waveform.CNQX = [waveform.CNQX; curr];
end


%% CNQX vs. CNQX+stim1X ctrl
clear;
load('C:\Users\mingfaifong\Documents\Upscaling Paper\cultureID_CNQXvsCNQXstim1XvsCtrl.mat');
clear waveform
waveform.ctrl = [];
waveform.CNQX = [];
waveform.CNQXstim1X = [];
for i = 1:length(cultureID.ctrl)
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.ctrl{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.ctrl{i}},[length(curr),1]);
    waveform.ctrl = [waveform.ctrl; curr];
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.CNQX{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.CNQX{i}},[length(curr),1]);
    waveform.CNQX = [waveform.CNQX; curr];
    load(['C:\Users\mingfaifong\Documents\Upscaling Paper\waveform\' cultureID.CNQXstim1x{i} '_waveform.mat']);
    curr(:,2) = repmat({cultureID.CNQXstim1x{i}},[length(curr),1]);
    waveform.CNQXstim1X = [waveform.CNQXstim1X; curr];
end