VARIABLE and CENTRO/ATOM Commands

Dear Lammps users,
Hello

I am working on Nano-indentation, and using centro/atom compute, which gives me some numbers between 0 to 50.
I want to categorize them into 3 categories. first between 0-3, second 3-6 and third one more than 6.
I have tried both IF and VARIABLE commands, but could not use them in the proper way.
Could somebody guide me the proper command?
I used IF in this way:

if “(6 < ${c_1})” then “c_1=3”

and the VARIABLE command:

variable 1 atom 0<c_1<3
variable 2 atom “3=<c_1<6”
variable 3 atom “6=<c_1”
But non of them worked.

So am i using the commands in the wrong way or i should use some other commands?

Thanks a lot

Mahdi

( ):

If by "categorize" you mean you want the number of atoms with
CS = 1,2,3, then try this:

variable foo atom (c_1==1)+(c_2==2)+(c_1==3)

Steve