Q:

how to write the value to each matrix index

For example, I have set up a formula to find my Xnew[k+1], Ynew[k+1] and Anew[k+1]. 
How do I pass the value to a 3 by 1 matrix if I want my 

index 1,1 be Xnew[k+1],
index 1,2 be Ynew[k+1],
index 1,3 be Anew[k+1].

Here's what I got so far.
for (k = 0; k < 5; k++)
{
    Xnew[k+1] = cX + (T * MPCV[k]) * Math.Cos(cA);
    Ynew[k+1] = cY + (T * MPCV[k]) * Math.Sin(cA);
    Anew[k+1] = cA + (T * MPCW[k]);

    double[,] qK = new double[3, 1];
    int i, j;
    for (i = 0; i < 3; i++)
    {
        for (j = 0; j < 1; j++)
        {
            qK[i, j] = 1;
        }
    }
}

Thank you for the help. 

A:

Suposing Xnew[k+1], Ynew[k+1] and Anew[k+1] are doubles:
for ( k = 0; k < 5; k++ ) {
    Xnew[k + 1] = cX + (T * MPCV[k]) * Math.Cos(cA);
    Ynew[k + 1] = cY + (T * MPCV[k]) * Math.Sin(cA);
    Anew[k + 1] = cA + (T * MPCW[k]);

    double[,] qk = { { Xnew[k + 1] ,  Ynew[k + 1] ,  Anew[k + 1] } };
}

This will make you a 1x3 matrix (arrays start in 0) with:

qk[0,0] = Xnew[k+1]
qk[0,1] = Ynew[k+1]
qk[0,2] = Anew[k+1]

But if you want a 3x1 matrix use instead.
 double[,] qk = { { Xnew[k + 1] },  {Ynew[k + 1] },  {Anew[k + 1] } };

That will give you:

qk[0,0] = Xnew[k+1]
qk[1,0] = Ynew[k+1]
qk[2,0] = Anew[k+1]

