![]() Registered Member ![]()
|
Hello, I'm using Eigen to do some work, but I meet some troubles.
In one function, I need a tmp array, so I defined ArryXd xyz, and then xyz.resize(x, y), the 2nd line is next to the 1st line. It can be compiled, but when I debug it, it can't run at the 2nd line which is xyz.resize(x, y) the hint is "invalid sizes of matrix or array" I debugged the program, I'm sure the number of size is correct. I used it before, and it could run previously, can anybody help to resolve it? My working environment is win7x64sp1, MSYS2x64 with mingw64-4.9.0 for MSYS2, and eigen was installed separately. |
![]() Registered Member ![]()
|
The issue may be that ArrayXd is a one-dimensional array. If you want a two-dimensional array, you need ArrayXXd (two Xs indicating two dimensions). This is different from MatrixXd which is always two-dimensional, because a "one-dimensional matrix" is called a vector.
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]