I have static class theat declare the array:
static class GlobalDataClass
{
public static double[,] dDataArray = new double[10, 2];
}
Now I have a function that stream the text file line by line by having the number of rows and index of the array:
using (StreamReader sr = new StreamReader(filename))
{
double[] dx = new double[lines]; //lines store number of rows
double[] dy = new double[lines]; //lines store number of rows
for (long li = 0; li < lines; li++)
{
dx[li] = GlobalDataClass.dDataArray[li, 0];
dy[li] = GlobalDataClass.dDataArray[li, 1];
}
}
My text file will be like:
1,2
2,3
3,4
5,6
Now how to have the output matrix like:
dx[1] [0,0] = 1
dy[1] [0,1] = 2
and so on.