Histogram bins addition

I have histogram from bin 0 to 180.

which meant for i = 0 to 180 , get histogram value

and i want to add histogram bin values 170 to 180 in bin 0 to 10.
Its like

bins: 180 , 179 , 178 , 177 , 176 , 175 , 174 , 173 , 172 , 171, 170
Add
bins: 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10

By doing that histogram value of bin number 180 will add to histogram value of bin number 0
same histogram value of bin number 179 will add to bin number 1

same all from 180 to 179 , 0 to 10
How can we do that?
Any idea ,.thanks

1
2
for(int k = 0; k <= 10; k++ )
    histogram[i] += histogram[180-i];
Topic archived. No new replies allowed.