Registered Member
|
Hey beloved Eigen Team,
I was wondering why this construct work:
but this one doesn't:
and I have to do:
thanks in advance! |
Registered Member
|
i think the function you're looking for is cwiseQuotient
|
Registered Member
|
No,
doesn't give the same result as: for(i=0;i<p;++i) x2.col(i).array()/=lambc(i); |
Moderator
|
x2.rowwise()/=lamba;
means for each i, x2.row(i) = x2.row(i) / lambda. In terms of linear algebra, this operation does not make sense. So you need to move to arrays: x2.array().rowwise() /= lambda.array(); |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]