Hello,
Please check with the example below:
int groupData(void)
{
Worksheet wks = Project.ActiveLayer();
vector sub0_1, sub1_2, sub2_3; //vector to save data in range 0~1, 1~2, 2~3
Dataset source;
source.Attach(wks,0); //analysis for column 0
for(int i=0;i<source.GetSize();i++)
{
int dd=(int)source[i];
switch(dd){
case 0:
sub0_1.Add(source[i]);
break;
case 1:
sub1_2.Add(source[i]);
break;
case 2:
sub2_3.Add(source[i]);
break;
}
}
return 0;
}
Best regards!
Jason
OriginLab Technical Service