From: uri on
Hello,

when I run
[~,~,V] = svds(M,j)
multiple times on the same matrix, the results aren't always the same. I calculate the sum of square distances from V to M in order to check it.
and the inconsistency gets worse for higher j's.
sometimes the svds even returns a V matrix which has less than j columns.

Thanks
From: Bruno Luong on
"uri " <sshangover(a)hotmail.com> wrote in message <hs42rt$co5$1(a)fred.mathworks.com>...
> Hello,
>
> when I run
> [~,~,V] = svds(M,j)
> multiple times on the same matrix, the results aren't always the same. I calculate the sum of square distances from V to M in order to check it.
> and the inconsistency gets worse for higher j's.
> sometimes the svds even returns a V matrix which has less than j columns.
>

SVDS() uses Arnoldi iteration with a starting vector generated *randomy*. That explains the behavior you have seen.

Bruno
From: uri on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hs4bsk$bm6$1(a)fred.mathworks.com>...
> "uri " <sshangover(a)hotmail.com> wrote in message <hs42rt$co5$1(a)fred.mathworks.com>...
> > Hello,
> >
> > when I run
> > [~,~,V] = svds(M,j)
> > multiple times on the same matrix, the results aren't always the same. I calculate the sum of square distances from V to M in order to check it.
> > and the inconsistency gets worse for higher j's.
> > sometimes the svds even returns a V matrix which has less than j columns.
> >
>
> SVDS() uses Arnoldi iteration with a starting vector generated *randomy*. That explains the behavior you have seen.
>
Sounds weird, it still does not suppose to provide wrong results...
> Bruno