The revolutionary project management tool is here! Plan visually with a single glance and make sure your projects get done.
double[][] X;
........
X[0][i] = inX[0];
java.lang.NullPointerExcepint i;
double[] inX = new double[3];
double[][] X = new double [3][i];
..................
i = 20;
X[0][i] = inX[0];
for (int i = 19; i > 0; i--)
{
X[0][i] = X[0][i-1];
}
java.lang.ArrayIndexOutOfBoundsException: 20
public class AlgoCalc {
int j;
double[][] X = new double[3][20];
public void algoCalc(double[] inX) {
for (int j = 19; j > 0; j--) {
X[0][j] = X[0][j - 1];
}
X[0][j] = inX[0];
X[1][j] = inX[1];
X[2][j] = inX[2];
System.out.println(" ixX[0] " + inX[0] + " : " + " inX[1] " + inX[1] + " : " + new java.util.Date());
System.out.println(" X[0][0] " + X[0][0] + " : " + " X[0][1] " + X[0][1] + " : " + " X[0][2] " + X[0][2] + " : " +
" X[0][3] " + X[0][3] + " : " + " X[0][4] " + X[0][4] + " : " + " X[0][5] " + X[0][5] + " : " +
" X[0][6] " + X[0][6] + " : " + " X[0][7] " + X[0][7] + " : " + " X[0][8] " + X[0][8] + " : " +
" X[0][9] " + X[0][9] + " : " + " X[0][10] " + X[0][10] + " : " + " X[0][11] " + X[0][11] + " : " +
" X[0][12] " + X[0][12] + " : " + " X[0][13] " + X[0][13] + " : " +" X[0][14] " + X[0][14] + " : " +
" X[0][15] " + X[0][15] + " : " + " X[0][16] " + X[0][16] + " : " + " X[0][17] " + X[0][17] + " : " +
" X[0][18] " + X[0][18] + " : " + " X[0][19] " + X[0][19] + " : " + new java.util.Date());
}
}
X[0][0] 0.06825125000000001 : X[0][1] 0.06825624999999999 : X[0][2] 0.06825775 : X[0][3] 0.06825775 : X[0][4] 0.06825775 : X[0][5] 0.06825775 : X[0][6] 0.06825775 : X[0][7] 0.06825574999999999 : X[0][8] 0.06825574999999999 : X[0][9] 0.06825975 : X[0][10] 0.06825975 : X[0][11] 0.06826375 : X[0][12] 0.06826375 : X[0][13] 0.06826125000000001 : X[0][14] 0.06826125000000001 : X[0][15] 0.06826125000000001 : X[0][16] 0.06826125000000001 : X[0][17] 0.06826125000000001 : X[0][18] 0.06826025 : X[0][19] 0.06826025 : Mon Nov 22 17:11:39 EET 2010
Open in new window