function index = findRow(M, row)
%FINDROW Find row in matrix.
%   INDEX = FINDROW(M, ROW) finds the row of the matrix M that has values
%   equal to ROW. The index of the first row found is returned, or [] if
%   it was not found.

%   Author: Damien Teney

assert(size(row, 2) == size(M, 2));

index = find(ismember(M, row, 'rows'), 1);
