In the code below I get error indicating error in accessing one-dimentional matrix

This code was working OK but I wanted to relocate the function that includes this code.

Question:

What is the proper format for accessing matrix below?

x = Matrix( 1, 10, 0);

value = x[0][5]; OR value = x[5];

What is the scope of a matrix?

```
for( b = 1; b <= 12; b++ )
{
//calculate rectangle coordinates
MomGZero = MomGZeroMx[0][b]; // <<<< ==== PROBLEM LINE
//
x1 = 2 * X_BlankSpace + FirstBar_Offset + ( b - 1 ) * Monthwidth - 3;
y1 = yzero;
x2 = int( x1 + ( num_Years ) * Barwidth );
y2 = y1 - ( AvgMonthMomMx[0][b] * Y_scalemult );
//
//Compute x-center value for prior month
if( b == 1 ) bb = 12;
//
x3 = 2 * X_BlankSpace + FirstBar_Offset + ( bb ) * Monthwidth - 3;
x3 = ( x1 + x2 ) / 2;
//
if( b > 0 AND b < 12 ) select_month = Curr_Month + 1;
else select_month = 1;
if( select_month == b )
{
GfxSelectSolidBrush( colorblue );
GfxSelectPen( colorblue, width = 2, penstyle = 0 );
}
else
{
if( MomGZero >= 80 ) GfxSelectSolidBrush( colorgreen ); // 80% of annual momentums in given month are greater than zero
else
GfxSelectSolidBrush( colorpalegreen ); // color of month bar
GfxSelectPen( colorblue, width = 1, penstyle = 0 ); // Lines around month bar
}
//
GfxRectangle( x1, y1, x2, y2 ); // Plot Month averaged momentum
}
`
```