From dbfabfe6878641ffd01a41a98b931b9c581bd22a Mon Sep 17 00:00:00 2001 From: Yacine Date: Wed, 18 Sep 2019 13:23:06 -0400 Subject: [PATCH] delete unused files --- features/helper/assign_side_region.m | 76 ------------------- .../helper/threshold_anterior_posterior.m | 17 ----- 2 files changed, 93 deletions(-) delete mode 100644 features/helper/assign_side_region.m delete mode 100644 features/helper/threshold_anterior_posterior.m diff --git a/features/helper/assign_side_region.m b/features/helper/assign_side_region.m deleted file mode 100644 index 2a677fc3..00000000 --- a/features/helper/assign_side_region.m +++ /dev/null @@ -1,76 +0,0 @@ -function [side,region] = assign_side_region(x,y) -%ASSIGN_PLI_REGION Summary of this function goes here -% Detailed explanation goes here - - epsilon = 0.0000001; - - % Midline: - X = [7.96264703000000, -6.67669403200000]; - Y = [0,0]; - [coefficients] = polyfit(X, Y, 1); - slope = coefficients(1); - intercept = coefficients(2); - - if(y < epsilon && y > -epsilon) - side = 'both'; - region = 'midline'; - elseif(y > 0) - side = 'left'; - region = get_left_region(x,y); - else - side = 'right'; - region = get_right_region(x,y); - end - -end - - -% Helper functions to get either the left or right region -function region = get_left_region(x,y) - X = [6.02115996400000, 0.284948655000000, -4.49482169800000]; - Y = [4.45938718700000, 5.47913021000000, 5.83124149800000]; - [coefficients] = polyfit(X, Y, 1); - slope = coefficients(1); - intercept = coefficients(2); - - % Check if we are part of the three points - for i=1:length(X) - if(x == X(i)) - region = 'both'; - return; - end - end - - %Check if we are lateral and midline - y_threshold = slope*x + intercept; - if(y > y_threshold) - region = 'lateral'; - else - region = 'midline'; - end - -end - -function region = get_right_region(x,y) - X = [6.02115996400000, 0.284948655000000, -4.49482169800000]; - Y = [-4.45938718700000, -5.47913021000000, -5.83124149800000]; - [coefficients] = polyfit(X, Y, 1); - slope = coefficients(1); - intercept = coefficients(2); - - % Check if we are part of the three points - for i=1:length(X) - if(x == X(i)) - region = 'both'; - return; - end - end - - %Check if we are lateral and midline - y_threshold = slope*x + intercept; - if(y < y_threshold) - region = 'lateral'; - else - region = 'midline'; - end -end \ No newline at end of file diff --git a/features/helper/threshold_anterior_posterior.m b/features/helper/threshold_anterior_posterior.m deleted file mode 100644 index 8e01dc18..00000000 --- a/features/helper/threshold_anterior_posterior.m +++ /dev/null @@ -1,17 +0,0 @@ -function [normalized_value] = threshold_anterior_posterior(index,channels_location) -%THRESHOLD_ANTERIOR_POSTERIOR Summary of this function goes here -% Detailed explanation goes here - - current_x = channels_location(index).X; - - all_x = zeros(1,length(channels_location)); - for i = 1:length(channels_location) - all_x(i) = channels_location(i).X; - end - - min_x = min(all_x); - max_x = max(all_x); - - normalized_value = (current_x - min_x)/(max_x - min_x); -end -