Re: Behaviour of svd_lapack

From: Andrew Mai <mai_at_nyahnyahspammersnyahnyah>
Date: Fri, 03 Jul 2009 05:22:19 -0600

Lunde, Bruce N CIV NAVOCEANO, NP1 wrote:

> The quirks with repect to rows and columns
> bother me, since I was hoping to do linear
> algebra calculations without having to think
> about that. The only time in the past I had to
> think about that issue (with any language)
> was when I was writing matrices to disk.

For what it's worth, the order of things in memory (a linear string of
words) is the same. Only the way to reference things in the language is
different. When you take a transpose, of course, you are re-arranging
things in memory -- a potentially expensive operation for large matrices.

> One issue in the present example which bothers
> me, is that when I transpose the input, in the
> output the U matrix is transposed but the V
> matrix is not (it has a minus sign in the
> lower left element, as does MATLAB).

This is because the underlying LAPACK routine returns the transpose of V
but NCL returns V. Again, you should not be thinking of matrices in NCL
as being transposes of what they are in, say, MATLAB. Just remember that
the notation is in the opposite order.


ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Fri Jul 03 2009 - 05:22:19 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 07 2009 - 11:13:18 MDT