Partition Data At Points results.
d=partition(d,ct)
d=d.partition(ct)
[d,v]=partition(d,ct)
[~,v]=partition(d,ct,'veconly')
PARTITION partitions results using the input partitioning data CT. When CT is a numeric or logical vector, PARTITION will partition the results to the indices specified in CT. This is the same as subscripting the object.
When CT is a cell array containing numeric MxN matrix, PARTITION attempts to match the first N rows in this matrix to the first N rows in the component matrix. To match all of the entries in a column, use INF for that column. For example,
CT = {[1; 2]}
specifies that PARTITION should match all components with points 1 and 2. CT can contain rows both with and without INF. PARTITION will not issue a warning if not all of the entries were found.
The optional input string 'veconly' tells PARTITION to generate the output vector V only, and not create the partitioned result.
V is a logical vector of the same length as the number of rows in the component matrix containing true for rows that were kept when partitioning.
>> d = d.partition([1 2 7]);
>> [d,v] = d.partition({[1; 2]});
>> [~,v] = d.partition([1 2 7],'veconly');