| Financial Toolbox | Search  Help Desk |
| datefind | Examples See Also |
Indices of date numbers in matrix.
Syntax
ind = datefind(sub, super, tol) ind = datefind(sub, super)
Arguments
subsuper. These date numbers must be a non-repeating subset of those in super.supertol+/-) for matching the date numbers in super. A positive integer. Default = 0.Description
ind = datefind(sub, super, tol)
returns a vector of indices to the date numbers in super that are present in sub, plus or minus the tolerance tol. If no date numbers match, ind = [].
Although this function was designed for use with sequential date numbers, you can use it with any non-repeating integers.
Example
super = datenum(1997, 7, 1:31);
sub = [datenum(1997, 7, 10); datenum(1997, 7, 20)];
ind = datefind(sub, super, 1)
ind =
9
10
11
19
20
21
See Also
datenum