Hi everyone:
I have written a loop (below). What I want is to fill a 2-dimensional array called instantAct with values from another 2-d array called mS.
Here's the problem... instantAct and mS have different dimensions. But they have the same number of values. I want my loop to take certain values from mS and put them in instantAct. The problem is that instantAct is remaining empty. I have checked mS and there are values in it, and my indexing to get them is correct.
My question is, why is instantAct still empty? Is it NOT possible to use a complicated loop to equate two arrays? Thanks a lot for any help! Here is my code:
for ( int i = 0; i < array.NumberOfIntervals(); i++ )
{
for (int j = 0; j < nC; j++)
{
for (int k = (nC * xAg) - nC; k < (nC * xAg); k++)
{
instantAct[ i ][ j ] = mS[ i ][ k ];
}
}
}
I have written a loop (below). What I want is to fill a 2-dimensional array called instantAct with values from another 2-d array called mS.
Here's the problem... instantAct and mS have different dimensions. But they have the same number of values. I want my loop to take certain values from mS and put them in instantAct. The problem is that instantAct is remaining empty. I have checked mS and there are values in it, and my indexing to get them is correct.
My question is, why is instantAct still empty? Is it NOT possible to use a complicated loop to equate two arrays? Thanks a lot for any help! Here is my code:
for ( int i = 0; i < array.NumberOfIntervals(); i++ )
{
for (int j = 0; j < nC; j++)
{
for (int k = (nC * xAg) - nC; k < (nC * xAg); k++)
{
instantAct[ i ][ j ] = mS[ i ][ k ];
}
}
}