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


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


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


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