Last change
on this file since 86 was
37,
checked in by (none), 15 years ago
|
Added original make3d
|
-
Property svn:executable set to
*
|
File size:
767 bytes
|
Line | |
---|
1 | function [tf,loc] = ismember_sorted_rows(a,s)
|
---|
2 | %ISMEMBER_SORTED_ROWS True for member of sorted set of rows.
|
---|
3 | % TF = ISMEMBER_SORTED_ROWS(A,S) for the matrix A returns a column vector TF
|
---|
4 | % where TF(i) = 1 if A(i,:) is in S and 0 otherwise.
|
---|
5 | % A and S must be row-sorted and cannot contain NaN.
|
---|
6 | %
|
---|
7 | % [TF,LOC] = ISMEMBER_SORTED_ROWS(A,S) also returns an index array LOC where
|
---|
8 | % LOC(i) is the index in S which matches A(i) (highest if there are ties)
|
---|
9 | % or 0 if there is no such index.
|
---|
10 | %
|
---|
11 | % See also ISMEMBER, MATCH_SORTED_ROWS, INTERSECT_SORTED_ROWS, SETDIFF_SORTED_ROWS, UNION_SORTED_ROWS.
|
---|
12 |
|
---|
13 | % Written by Tom Minka
|
---|
14 | % (c) Microsoft Corporation. All rights reserved.
|
---|
15 |
|
---|
16 | if nargout < 2
|
---|
17 | tf = ismember(a,s,'rows');
|
---|
18 | else
|
---|
19 | [tf,loc] = ismember(a,s,'rows');
|
---|
20 | end
|
---|
Note: See
TracBrowser
for help on using the repository browser.