Accessing an element within an array

Hi guys, im having a problem with accessing elements of this array, when I attempt to access [1][1] as below it dosnt not give the the value i expect (15251), im pretty stuck to be honest can someone help me out.

 unsigned int unsigned_int_array_lab_data[48][27] = {
  {0,1,12,14,16,18,2,22,24,26,28,3,32,34,36,38,4,42,44,46,48,5,52,54,56,58,6},
  {2000,15251,15232,15040,14880,14848,14784,14720,14688,14592,14560,14528,14400,14144,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {2050,16320,16192,16064,15872,15680,15424,15296,15232,15104,15040,15008,14976,14905,0,0,0,0,0,0,0,0,0,0,0,0,0},
  {2100,16832,16768,16640,16576,16384,16192,16128,16064,16000,15936,15904,15808,15744,15680,0,0,0,0,0,0,0,0,0,0,0,0},
  {2150,17536,17465,17088,17024,16960,16768,16704,16576,16512,16505,16384,16320,16236,16192,0,0,0,0,0,0,0,0,0,0,0,0},
  {2200,18240,18112,18048,17856,17728,17600,17472,17408,17344,17216,17152,17024,16864,16832,16800,0,0,0,0,0,0,0,0,0,0,0},
  {2250,18880,18816,18688,18496,18368,18240,18214,18176,18112,17984,17856,17721,17664,17472,17408,0,0,0,0,0,0,0,0,0,0,0},
  {2300,19776,19712,19520,19392,19264,19136,19072,19008,18944,18880,18624,18432,18368,18304,18240,18176,0,0,0,0,0,0,0,0,0,0},
  {2350,20352,20288,20096,19968,19904,19776,19648,19520,19456,19193,19136,19008,18880,18816,18752,18560,0,0,0,0,0,0,0,0,0,0},
  {2400,21184,21120,20800,20608,20544,20416,20352,20288,20096,20032,19840,19776,19648,19456,19430,19392,19328,0,0,0,0,0,0,0,0,0},
  {2450,22208,22080,21760,21632,21504,21440,21312,21120,21056,20928,20864,20736,20640,20544,20416,20352,20224,0,0,0,0,0,0,0,0,0},
  {2500,22592,22528,22336,22144,21952,21888,21824,21696,21568,21376,21312,21056,21024,20992,20800,20736,20672,20416,0,0,0,0,0,0,0,0},
  {2550,23424,23296,23168,22976,22848,22720,22592,22400,22336,22272,22144,21888,21696,21568,21440,21312,21216,21184,0,0,0,0,0,0,0,0},
  {2600,24256,24192,24096,23936,23872,23744,23616,23488,23424,23232,23104,22976,22848,22784,22656,22464,22400,22272,0,0,0,0,0,0,0,0},
  {2650,25120,25024,24768,24576,24512,24448,24320,24192,24128,23936,23744,23616,23296,23232,23168,23008,22976,22848,22835,0,0,0,0,0,0,0},
  {2700,25792,25664,25472,25344,25280,25216,25088,24960,24832,24640,24512,24384,24192,24128,23936,23744,23712,23552,23424,23392,0,0,0,0,0,0},
  {2750,26496,26432,26368,26272,26112,25856,25792,25728,25664,25600,25536,25472,25376,25344,25280,25088,25088,24992,24960,24896,0,0,0,0,0,0},
  {2800,27520,27392,27328,27200,27104,27008,26944,26816,26784,26752,26688,26624,26496,26304,26176,25984,25792,25728,25664,25600,25472,0,0,0,0,0},
  {2850,28544,28480,28288,28224,28064,27712,27392,27264,27168,27072,27008,26848,26816,26752,26656,26624,26560,26528,26432,26400,26304,0,0,0,0,0},
  {2900,29504,29376,29248,29120,29024,28928,28800,28736,28672,28544,28416,28352,28160,28096,27968,27904,27776,27712,27680,27584,27456,27328,0,0,0,0},
  {2950,30592,30272,29952,29760,29664,29632,29504,29376,29312,29184,29248,29120,28992,28960,28864,28352,28160,27968,28064,28032,28096,27968,0,0,0,0},
  {3000,31264,31232,31104,31040,31008,30912,30816,30784,30592,30400,30272,30112,30080,30016,29888,29632,29568,29440,29312,29248,28992,28800,28928,0,0,0},
  {3050,32320,32128,32000,31936,31808,31744,31616,31584,31552,31488,31232,31104,30976,30848,30784,30656,30400,30464,30336,30208,30080,29952,29888,0,0,0},
  {3100,33664,33408,33280,33120,32960,32832,32576,32256,32064,32000,31936,31872,31744,31552,31520,31392,31360,31296,31168,31040,30784,30720,30656,30464,0,0},
  {3150,34272,34112,34048,33920,33856,33728,33536,33408,33280,33152,33088,32960,32704,32576,32448,32384,32192,32000,31936,31872,31808,31776,31744,31680,0,0},
  {3200,35520,35264,35136,34816,34560,34432,34240,34176,34112,34048,33856,33664,33600,33408,33216,33152,33024,32832,32704,32608,32576,32448,32416,32384,0,0},
  {3250,36672,36544,36480,36416,36288,36224,36160,36032,35904,35776,35712,35584,35456,35264,35136,35008,34752,34432,34368,34240,34112,33984,33856,33664,33472,0},
  {3300,37632,37568,37504,37312,37120,36992,36864,36800,36736,36672,36544,36416,36352,36160,36032,35776,35648,35392,35200,35072,34944,34816,34624,34528,34496,0},
  {3350,38720,38528,38400,38336,38240,38176,38144,38080,37952,37888,37632,37440,37248,36992,36928,36736,36608,36416,36352,36032,36160,35840,35584,35520,35392,35328},
  {3400,39616,39552,39424,39360,39232,39200,39136,39072,39040,38848,38656,38464,38272,38208,38144,37952,37632,37376,37312,36864,36480,36288,35968,35936,35904,35840},
  {3450,40512,40384,40320,40224,40192,40064,40032,39936,39904,39872,39744,39616,39488,39424,39104,38976,38912,38656,38336,38208,37696,37568,37440,37376,37280,37248},
  {3500,41536,41472,41344,41216,41152,41024,40832,40768,40704,40384,40256,40096,40064,40000,39776,39744,39552,39513,39488,39104,38912,38656,38528,38336,38304,38272},
  {3550,42688,42496,42432,42336,42240,42176,42112,42048,41856,41824,41792,41728,41408,41152,41056,41024,40704,40512,40320,40192,40128,39744,39616,39488,39296,39104},
  {3600,43968,43840,43712,43520,43456,43328,43200,42944,42816,42752,42688,42560,42048,41920,41856,41760,41728,41408,41152,40768,40704,40640,40512,40384,40288,40192},
  {3650,45248,45056,44992,44864,44736,44608,44416,44288,44160,43904,43776,43520,43456,43136,42944,42688,42624,42560,42176,41920,41728,41600,41536,41504,41408,41344},
  {3700,46464,46144,46016,45888,45760,45664,45568,45376,45184,44928,44736,44672,44608,44416,44352,44224,43968,43840,43648,43008,42816,42752,42624,42304,42208,42112},
  {3750,47552,47488,47296,47104,46784,46528,46272,46144,45952,45888,45760,45440,45184,45120,44992,44800,44736,44160,43840,43776,43520,43072,42816,42688,42560,42432},
  {3800,49088,48960,48640,48320,47552,47104,46912,46720,46592,46336,46208,46144,46080,45952,45696,45568,45440,45120,44928,44736,44672,44416,44288,44096,43712,43648},
  {3850,49600,49472,49280,48960,49088,48960,48640,48576,48448,48352,48320,48128,48096,47936,47552,47296,47040,46912,46784,46528,46464,46336,46016,45888,45504,45312},
  {3900,51008,50880,50752,50624,50496,50304,50176,50048,49920,49856,49760,49664,49600,49408,49216,48768,48704,48640,48512,48256,48000,47808,47776,47104,46976,46848},
  {3950,52032,51904,51776,51584,51392,51200,51072,50944,50816,50688,50496,50432,50368,50304,50240,50112,49984,49600,49408,49280,49088,48896,48832,48640,48320,48256},
  {4000,53568,53504,53312,53056,52800,52544,52288,52064,51840,51776,51648,51392,51136,51072,50880,50816,50752,50560,50368,50240,50112,49920,49792,49600,49472,49344},
  {4050,55040,54656,54464,54272,54144,53952,53760,53696,53664,53632,53568,53440,53184,52864,52480,52416,52288,52160,51904,51712,51648,51520,51328,51136,51040,50944},
  {4100,56320,56192,56064,55936,55808,55616,55296,55040,54912,54784,54656,54592,54400,54144,53952,53888,53824,53696,53568,53440,53280,53056,52864,52672,52640,52608},
  {4150,57280,56960,56832,56704,56576,56384,56320,56256,56192,56064,55936,55808,55616,55360,55040,54912,54848,54720,54592,54304,54016,53888,53696,53632,53600,53568},
  {4200,58880,58432,58240,57536,57408,57344,57280,57216,57088,56960,56832,56768,56576,56512,56320,56256,56288,56128,56000,55680,55552,55104,54848,54752,54720,54656},
  {4250,61120,59520,59392,59200,58880,58624,58432,58240,57536,57408,57344,57280,57216,57088,56960,56832,56768,56576,56512,56320,56256,56288,56128,56000,55936,55872},
  {4300,61440,61248,61184,61120,60800,60768,60736,60704,60672,60736,60608,60416,60352,60160,60032,59520,59392,58944,58752,58624,58560,58496,58176,57856,57600,56960}
};

unsigned int a;
            
void setup(){
  Serial.begin(9600);
  a = unsigned_int_array_lab_data[1][1];
  Serial.println(a);
}
void loop(){}

This array is bigger (48*27*2 = 2592 bytes) than the memory of your UNO. Maybe this is your problem?

I am using an UNO so yes i guess that must be it, thank you. Could i divide each value in the array by say 100 ish to bring all the values below 256 and declair it as something else other than an unsiged int to decrease the amount of memory the array uses?

My suggestion would be to test your logic with a tiny array of say 2x3 just to make sure the code is kosher. Will only take you a minute and you'll know that one potential source of the problem is eliminated.

Jim

Could i divide each value in the array by say 100 ish to bring all the values below 256 and declair it as something else other than an unsiged int to decrease the amount of memory the array uses?

That all depends on whether you can tolerate the loss of accuracy that will result. The array name, unsigned_int_array_lab_data, doesn't tell us squat about the data.

Using uint8_t you will lost first line completely (0,0,0,....), and degrade accuracy in what left. Look into PROGMEM, and store your array in flash memory. http://www.arduino.cc/playground/Main/PROGMEM

Ive taken jims advice and knocked up a simpler array, when I run the code to find the [1][1] of the array the value I get back is 0, i dont understand why? Should it not be 5?

unsigned int unsigned_int_array_lab_data[2][3] = {
{1,2,3},
(4,5,6)
};

unsigned int a;
            
void setup(){
  Serial.begin(9600);
  a = unsigned_int_array_lab_data[1][1];
  Serial.println(a);
}
void loop(){}

You have a mix of {} and () round the elements' rows.... that could contribute?

Thanks jim, silly misstake, and thanks Magician ill have a look into PROGMEM Thanks for the help guys