function [sensor_Levels] = getSensorLevels(Dist_IR_sensor,DLevels)
%GETSENSORLEVELS Summary of this function goes here
%   Detailed explanation goes here

IL_1 = Dist_IR_sensor(:,1) >= DLevels(1) & Dist_IR_sensor < DLevels(2);
IL_2 = Dist_IR_sensor(:,1) >= DLevels(2) & Dist_IR_sensor < DLevels(3);
IL_3 = Dist_IR_sensor(:,1) >= DLevels(3) & Dist_IR_sensor < DLevels(4);
IL_4 = Dist_IR_sensor(:,1) >= DLevels(4);
sensor_Levels= zeros(size(Dist_IR_sensor));
sensor_Levels(IL_1) = 1;
sensor_Levels(IL_2) = 2;
sensor_Levels(IL_3) = 3;
sensor_Levels(IL_4) = 4;
end

