combining arrays

Hello again, Arduino forums. I’m looking at combining arrays in a current project. Currently I have five servos and five sensors. They read in order so that you have:

Servo1 = {1,2,3,4,5};
Servo2 = {6,7,8,9,10};

etc. Each servo has five different sensor readings in its array. I’d like to combine these into a single array later in the code so I can find the median and max/min. Is there any way to do this?

Thanks,

Kevin

It sounds like you need to look at two dimensional arrays, but your code snippet above doesn't make much sense.

Sorry 'bout that, I was chasing a solution that I didn't need to. Turns out that I just needed to use a larger single-dimensional array for my data, and just figure out a tricky way to place data into it.

Turns out that I just needed to use a larger single-dimensional array for my data, and just figure out a tricky way to place data into it.

Still sounds like less tricky but more dimensions could be more elegant.

Also, that more tricky way may well be exactly what the compiler would do for you with 2D arrays if you ask it nicely.