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

colwise() normalize() ?

Tags: None
(comma "," separated)
stuart-macg
Registered Member
Posts
18
Karma
0
OS

colwise() normalize() ?

Wed Feb 09, 2011 7:49 pm
Is there a nice (and efficient) way of normalising an array of row or column vectors?
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: colwise() normalize() ?

Tue Feb 15, 2011 3:29 pm
I miss is too, so I'll try to implement it asap. In the meantime I think you can still do:

mat = mat.array().rowwise() / mat.colwise().norm().eval().array();


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft