The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

magnitude of column vectors in a matrix

Open discussion regarding features, bugs, issues, vendors, etc.

magnitude of column vectors in a matrix

Postby michael_mc » Tue Jan 19, 2010 10:03 am

Hello all,

I'm new to LAPACK and I am trying to compute the magnitude (square of the l2 norm ) of each of a set of vectors stored in a matrix (one vector per column).

For example, if the dimensionality of the vectors is 10, and if I have 200 vectors, the matrix will be 200x10 .
I need to output a 1x200 matrix where each column is the magnitude of each of the 200 vectors.

I know that there is a routine in the BLAS leve-1 that can compute the L2 norm of only one vector. In my case, I need to efficiently do the computation for millions of vectors.


PS: This is how I do this in MATLAB: result= sum(v.^2); where v is a matrix with one vector per column

Thank you for your attention,
best rgs,
Michael C.
michael_mc
 
Posts: 2
Joined: Mon Jan 18, 2010 4:23 pm

Return to User Discussion

Who is online

Users browsing this forum: No registered users and 5 guests