close all
clear all

StartDateNum = datenum('17-Mar-2017 09:00:00');
EndDateNum = datenum('24-Mar-2017 16:00:00');



DecodedFilesPath = '../DecodedResults/';

MatlabFilename = 'AllDataRaw.mat';


files = dir([DecodedFilesPath '*_raw.mat']);


load([DecodedFilesPath files(1).name]);
VarList = who('Time_DateNum','PC*','BC*','XB*','RC*','SC*');

for i = 2:length(files)
  disp(files(i).name);
  data = load([DecodedFilesPath files(i).name]);
    for j = 1:length(VarList)
        cmd = [VarList{j} ' = [' VarList{j} ' ;  data.' VarList{j} '];'];
        eval(cmd);
    end
end

save([MatlabFilename],'PC_*','BC_*','SC_*','RC_*','XB_*');

