EMGU: create a Matrix from TXT dataset. Matrix value changed after several times access
up vote
0
down vote
favorite
I have a problem when I create a matrix from TXT data set
TXT data set
1,2,-1
3,4,5
6,7,8
I used a CreateMatrixFromFile to create a matrix from txt file
Matrix value changed
e.x
matrix[0,1] = 2
after several times access to matrix
matrix[0,1] = 2 changed to 0 or Near zero
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
public static unsafe Matrix<double> CreateMatrixFromFile(string fileData, int pointCount)
{
List<double> rawdata = new List<double>();
int subLength = 0;
for (int i = 0; i < fileData.Length; i++)
{
string subData = fileData[i].Split(',');
subLength = subData.Length;
for (int j = 0; j < subLength; j++)
{
double temp = Convert.ToDouble(subData[j]);
rawdata.Add(temp);
}
}
double dataArray = rawdata.ToArray();
fixed (double* dataPtr = dataArray)
{
return new Matrix<double>(pointCount, subLength, (IntPtr)dataPtr);
}
}
c# matrix emgu
New contributor
add a comment |
up vote
0
down vote
favorite
I have a problem when I create a matrix from TXT data set
TXT data set
1,2,-1
3,4,5
6,7,8
I used a CreateMatrixFromFile to create a matrix from txt file
Matrix value changed
e.x
matrix[0,1] = 2
after several times access to matrix
matrix[0,1] = 2 changed to 0 or Near zero
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
public static unsafe Matrix<double> CreateMatrixFromFile(string fileData, int pointCount)
{
List<double> rawdata = new List<double>();
int subLength = 0;
for (int i = 0; i < fileData.Length; i++)
{
string subData = fileData[i].Split(',');
subLength = subData.Length;
for (int j = 0; j < subLength; j++)
{
double temp = Convert.ToDouble(subData[j]);
rawdata.Add(temp);
}
}
double dataArray = rawdata.ToArray();
fixed (double* dataPtr = dataArray)
{
return new Matrix<double>(pointCount, subLength, (IntPtr)dataPtr);
}
}
c# matrix emgu
New contributor
Sorry, this is my first post on StackOverflow. text Alignment is messed
– user9623096
Nov 5 at 2:08
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a problem when I create a matrix from TXT data set
TXT data set
1,2,-1
3,4,5
6,7,8
I used a CreateMatrixFromFile to create a matrix from txt file
Matrix value changed
e.x
matrix[0,1] = 2
after several times access to matrix
matrix[0,1] = 2 changed to 0 or Near zero
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
public static unsafe Matrix<double> CreateMatrixFromFile(string fileData, int pointCount)
{
List<double> rawdata = new List<double>();
int subLength = 0;
for (int i = 0; i < fileData.Length; i++)
{
string subData = fileData[i].Split(',');
subLength = subData.Length;
for (int j = 0; j < subLength; j++)
{
double temp = Convert.ToDouble(subData[j]);
rawdata.Add(temp);
}
}
double dataArray = rawdata.ToArray();
fixed (double* dataPtr = dataArray)
{
return new Matrix<double>(pointCount, subLength, (IntPtr)dataPtr);
}
}
c# matrix emgu
New contributor
I have a problem when I create a matrix from TXT data set
TXT data set
1,2,-1
3,4,5
6,7,8
I used a CreateMatrixFromFile to create a matrix from txt file
Matrix value changed
e.x
matrix[0,1] = 2
after several times access to matrix
matrix[0,1] = 2 changed to 0 or Near zero
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----2
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:02-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----0
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
2018/11/5 9:53:03-----8.90078774365775E-308
public static unsafe Matrix<double> CreateMatrixFromFile(string fileData, int pointCount)
{
List<double> rawdata = new List<double>();
int subLength = 0;
for (int i = 0; i < fileData.Length; i++)
{
string subData = fileData[i].Split(',');
subLength = subData.Length;
for (int j = 0; j < subLength; j++)
{
double temp = Convert.ToDouble(subData[j]);
rawdata.Add(temp);
}
}
double dataArray = rawdata.ToArray();
fixed (double* dataPtr = dataArray)
{
return new Matrix<double>(pointCount, subLength, (IntPtr)dataPtr);
}
}
c# matrix emgu
c# matrix emgu
New contributor
New contributor
edited Nov 5 at 2:14
New contributor
asked Nov 5 at 2:06
user9623096
11
11
New contributor
New contributor
Sorry, this is my first post on StackOverflow. text Alignment is messed
– user9623096
Nov 5 at 2:08
add a comment |
Sorry, this is my first post on StackOverflow. text Alignment is messed
– user9623096
Nov 5 at 2:08
Sorry, this is my first post on StackOverflow. text Alignment is messed
– user9623096
Nov 5 at 2:08
Sorry, this is my first post on StackOverflow. text Alignment is messed
– user9623096
Nov 5 at 2:08
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
user9623096 is a new contributor. Be nice, and check out our Code of Conduct.
user9623096 is a new contributor. Be nice, and check out our Code of Conduct.
user9623096 is a new contributor. Be nice, and check out our Code of Conduct.
user9623096 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53147414%2femgu-create-a-matrixdouble-from-txt-dataset-matrix-value-changed-after-sever%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sorry, this is my first post on StackOverflow. text Alignment is messed
– user9623096
Nov 5 at 2:08