Using find command to group data into bins
5 views (last 30 days)
I have one ascii file with 2 columns (1st X and 2nd Y) .
I want to group the elements of X into bins (e.g. [2-4,4-6, etc) and I would like to group values of Y values based on the group of X values.
How could I use find command in order to make it?
Could you please help me?
dpb on 26 Jul 2021
find is not the tool for this; see
grpstats or groupsummary or for more generality, findgroups combined with splitapply
Sulaymon Eshkabilov on 26 Jul 2021
If I have undersood your question correctly, in this case, find() is not quite efficient. Thus, you can better create just indxes, e.g.:
A1 = [X(2:4), Y(2:4)];
A2 = [X(4:6), Y(4:6)];
B1 = XY(2:4,:);
B2 = XY(4:6,:);