Partition Data At Nodes 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 an imat_ctrace, the result will be partitioned using the nodes and directions in CT. If not all of the coordinates were found, PARTITION will issue a warning.
When CT is an imat_group, the result will be partitioned to the nodes specified in the group. If not all of the nodes in the group were found, PARTITION will issue a warning.
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 inf 300]}
specifies that PARTITION should match all components with node 1, all directions, and SEID 300. 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 = d.partition(imat_ctrace('1x'));
>> [d,v] = d.partition({[1 inf 300; 2 2 0]});
>> [~,v] = d.partition([1 2 7],'veconly');