Split tree using masks

I would like to get automatically the branch which starts always with 0 and sub branch max. In this case the result should give {0;2} branch. I cannot put it straight mask {0;2} since Datatree is variable

Is there any mask to solve it ? or do i need to use tree statistics. I would prefer more smart mask.

unnamed.gh (6.0 KB)

Here’s one way to do it:

max_index_split_tree.gh (12.3 KB)

1 Like