# [Fwd: RE: [Fwd: Re: Array index out of bounds in svd.times()]]

• Subject: [Fwd: RE: [Fwd: Re: Array index out of bounds in svd.times()]]
• From: Ron Boisvert <boisvert@nist.gov>
• Date: Fri, 29 Jun 2007 13:32:31 -0400
• Content-Transfer-Encoding: 7bit
• Content-Type: text/plain; charset=ISO-8859-1; format=flowed
• User-Agent: Thunderbird 1.5.0.12 (Windows/20070509)

```Sender: "Cleve Moler" <Cleve.Moler@mathworks.com>
Subject: RE: [Fwd: Re: Array index out of bounds in svd.times()]

The first line of the documentation for the SVD routine says it computes
the SVD of m-by-n matrices with m >= n.  You will have to compute the
SVD of
the transpose of your matrix, then interchange and transpose the
results.
-- Cleve

-----Original Message-----
From: jama@nist.gov [mailto:jama@nist.gov] On Behalf Of Ron Boisvert
Sent: Friday, June 29, 2007 10:14 AM
To: Multiple recipients of list
Subject: [Fwd: Re: Array index out of bounds in svd.times()]

-------- Original Message --------
Subject: 	Re: Array index out of bounds in svd.times()
Date: 	Fri, 29 Jun 2007 11:27:12 -0400 (EDT)
From: 	Alexander Frey <alexanderfrey@gmail.com>
To: 	boisvert@nist.gov
References:
<a9628f570706290723g5387d8e2m3f9fae472001edc3@mail.gmail.com>

I have tracked the problem down to the point where I find that
svd.getS() throws the arrayoutofbounds exception.
I builded the matrix from which I compute the SVD by passing the Matrix
constructor a double[][] array. The array has 2 rows and 16 columns.
Many of the entries are zeros and 1's .

Where could be the problem ?

Thank you, Alexander

2007/6/29, Alexander Frey <alexanderfrey@gmail.com
<mailto:alexanderfrey@gmail.com>>:

Hello,

I get an array index out of bounds after trying to multiply 2
matrices from svd.

Matrix us = svd.getU().times(svd.getS());

This should give me the multiplied matrix m = U * S

What do I do wrong ?

Thank you, Alexander

```

Date Index | Thread Index | Problems or questions? Contact list-master@nist.gov