LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
vectmatch.m
1function i = vectmatch(row,matrix)
2
3% find the corresponding row in the matrix
4% here we assume there is one and only one 'row' in matrix
5
6[m,n] = size(matrix);
7% walk from end of matrix array and search for row starting with row.
8
9for outer = 1:m
10 for inner = 1:n+1
11 if inner == n+1
12 i = outer;
13 return;
14 else
15 if matrix(outer,inner) ~= row(inner)
16 break;
17 end
18 end
19 end
20end
21