This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] Dynamic Random Matrix - how to

Tags: None
(comma "," separated)
HWJ
Registered Member
Posts
18
Karma
0
Hi,

the following code gives a lot of error messages (which look strange to
a new user of Eigen2, as me).

#include
// import most common Eigen types
USING_PART_OF_NAMESPACE_EIGEN

int main() {
int N=4;
MatrixXd A = MatrixXd::Random(N,N);
}

How to initialize (or set) a dynamic matrix to a random matrix?

Thanks for any hints,
Helmut.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
as described in the doc of Random and in the tutorial, you need to include the Array module:

#include


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell