Hello all! I have a large 2D matrix (216x4) defined in my Flash storage as four 54x4 matricies. I’m having trouble referencing it a random row within a these matrices without exceeding SRAM storage limitations. I want to select a random row from this matrix, and light up these numbers red. Here’s a sample of my code.

int x = random(0, numTargets/4); // random target row number (0-53)

int r = random(0,4); // target element number (0-3)

for (int k = 0; k < 4; k ++) {

if (r == 1){ // first column of LEDS

int matNow[4] = matrix1;

for (int j = 0; j < 4; j++) {

matNow[j] = matrix1[j];}

leds[matrix1[k]] = CRGB::Red;

FastLED.show();}

else if (r == 2){ // second column of LEDS

int matNow[4] = matrix2;

for (int j = 0; j < 4; j++) {

matNow[j] = matrix2[j];}

leds[matrix2[k]] = CRGB::Red;

FastLED.show();}

else if (r == 3){ // third column of LEDS

int matNow[4] = matrix3;

for (int j = 0; j < 4; j++) {

matNow[j] = matrix3[j];}

leds[matrix3[k]] = CRGB::Red;

FastLED.show();}

else if (r == 4){ // fourth column of LEDS

int matNow[4] = matrix4;

for (int j = 0; j < 4; j++) {

matNow[j] = matrix4[j];}

leds[matrix4[k]] = CRGB::Red;

FastLED.show();}

Is there any way to reference a random one of these rows that exists in flash storage without referencing the entire matrix?