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

matrix arrays? I am naming my matrixes x0 x1 x2 and I have t

Tags: None
(comma "," separated)
joshw
Registered Member
Posts
5
Karma
0
matrix arrays? I am naming my matrixes x0 x1 x2 and I have to hard code what matrix I want to use.
I would like to be able to access the matrix like I would a integer array.
matrix declaration x[3];
x[0]=1,2,3,4,5;
x[1]=6,7,8,9;
x[2]=0,1,2,3;

can this be done easy I need examples I am not that good at c++...
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
That's very basic C/C++ usage:

Matrix3f x[3];
joshw
Registered Member
Posts
5
Karma
0
ggael wrote:That's very basic C/C++ usage:

Matrix3f x[3];

MatrixXd x(4,2);//data matrix x row col
is what I have...
the r and c are defined but I wanted a array of them.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]