Hi finally I read a bidimensional array as:
public double[][] readArray2D(Context c, String file,int rows,int cols) throws IOException {
double [][] data = new double[rows][cols];
int row = 0;
int col = 0;
BufferedReader bufRdr = null;
try {
bufRdr = new BufferedReader(new InputStreamReader(c.getAssets().open(file)));
} catch (IOException e) {
e.printStackTrace();
}
String line = null;
//read each line of text file
try {
while((line = bufRdr.readLine()) != null && row < data.length)
{
StringTokenizer st = new StringTokenizer(line," ");
while (st.hasMoreTokens())
{
//get next token and store it in the array
data[row][col] = Double.parseDouble(st.nextToken());
col++;
}
col = 0;
row++;
}
} catch (IOException e) {
e.printStackTrace();
}
return data;
}
Thanks for all ;)