function linearNumber = LEM_find_linearNumber(pt1, totalRow, del_y, del_x)
% LEM_row_col - calculates the linear number in the matrix
% On input:
%   pt1: current point within grid (x, y)
%   totalRow: The total number of rows
%   del_y: The change in y between the grid lines
%   del_x: The change in x between the grid lines
% On output:
%   linearNumber (float): the linear number that the point lies in.

currentPt = pt1;
row = totalRow - floor(currentPt(2)/del_y);
col = floor(currentPt(1)/del_x) + 1;

% Add current point
linearNumber = row + (totalRow*(col - 1));