Fault_Time = readmatrix("Fault_Time.xlsx");
load FaultyCase1.mat
Fault_1_1_Data = Set1_1(Fault_Time(1,1):Fault_Time(1,2),:);% Varying Varying
Fault_1_2_Data = Set1_2(Fault_Time(2,1):Fault_Time(2,2),:);% 2,0.0417
Fault_1_3_Data = Set1_3(Fault_Time(3,1):Fault_Time(3,2),:);% 3.5, 0.0208
writematrix(Fault_1_1_Data,'Fault_1_1_Data.xlsx');
writematrix(Fault_1_2_Data,'Fault_1_2_Data.xlsx');
writematrix(Fault_1_3_Data,'Fault_1_3_Data.xlsx');
Fault_0_3_Data_1 = Set1_3(Fault_Time(3,2):end,:);
%clear

Fault_Time = readmatrix("Fault_Time.xlsx");
load FaultyCase2.mat
Fault_2_1_Data = Set2_1(Fault_Time(4,1):Fault_Time(4,2),:);% Varying Varying
Fault_2_2_Data = Set2_2(Fault_Time(5,1):Fault_Time(5,2),:);% 2 0.0278
Fault_2_3_Data = Set2_3(Fault_Time(6,1):Fault_Time(6,2),:);% 3.5 0.0417
writematrix(Fault_2_1_Data,'Fault_2_1_Data.xlsx');
writematrix(Fault_2_2_Data,'Fault_2_2_Data.xlsx');
writematrix(Fault_2_3_Data,'Fault_2_3_Data.xlsx');

Fault_0_1_Data_1 = Set2_1(Fault_Time(4,2):end,:);
Fault_0_2_Data_0 = Set2_2(1:Fault_Time(5,1),:);
Fault_0_2_Data_1 = Set2_2(Fault_Time(5,2):end,:);

%clear

Fault_Time = readmatrix("Fault_Time.xlsx");
load FaultyCase3.mat
Fault_3_1_Data = Set3_1(Fault_Time(7,1):Fault_Time(7,2),:);% Varying Varying
Fault_3_2_Data = Set3_2(Fault_Time(8,1):Fault_Time(8,2),:);% 2 0.0278
Fault_3_3_Data = Set3_3(Fault_Time(9,1):Fault_Time(9,2),:);% 3.5 0.0208
writematrix(Fault_3_1_Data,'Fault_3_1_Data.xlsx');
writematrix(Fault_3_2_Data,'Fault_3_2_Data.xlsx');
writematrix(Fault_3_3_Data,'Fault_3_3_Data.xlsx');

Fault_0_1_Data_2 = Set3_1(Fault_Time(7,2):end,:);
Fault_0_2_Data_2 = Set3_2(Fault_Time(8,2):end,:);
Fault_0_3_Data_2 = Set3_3(Fault_Time(9,2):end,:);

Fault_0_1_Data = [Fault_0_1_Data_1; Fault_0_1_Data_2];
Fault_0_2_Data = [Fault_0_2_Data_0; Fault_0_2_Data_1; Fault_0_2_Data_2];
Fault_0_3_Data = [Fault_0_3_Data_1; Fault_0_3_Data_2];

writematrix(Fault_0_1_Data,'Fault_0_1_Data.xlsx');
writematrix(Fault_0_2_Data,'Fault_0_2_Data.xlsx');
writematrix(Fault_0_3_Data,'Fault_0_3_Data.xlsx');
clear

Fault_Time = readmatrix("Fault_Time.xlsx");
load FaultyCase4.mat
Fault_4_1_Data = Set4_1(Fault_Time(10,1):Fault_Time(10,2),:);% Varying Varying
Fault_4_2_Data = Set4_2(Fault_Time(11,1):Fault_Time(11,2),:);% 2,0.0417
Fault_4_3_Data = Set4_3(Fault_Time(12,1):Fault_Time(12,2),:);% 3.5 0.0208
writematrix(Fault_4_1_Data,'Fault_4_1_Data.xlsx');
writematrix(Fault_4_2_Data,'Fault_4_2_Data.xlsx');
writematrix(Fault_4_3_Data,'Fault_4_3_Data.xlsx');
clear