wes
07-25-2005, 05:11 PM
Hi,
I have a question regard the bidiagonalization portion of the SVD algorithm, specifially the following code:
for(l=k;l>=1;l--)
{
nm=l-1;
if((float)(fabs(rv1[l])+anorm)==anorm)
{
flag=0;
break;
}
if((float)(fabs(w[nm])+anorm)==anorm)
break;
}
Here, l ranges from k:1, so nm ranges from k-1:0. Also, w is a vector with indices from 1:n. So, it would seem that in the second if statement, we would be asking for w[0] which doesn't exists. Am I correct here? This seems like an error to me. I would appreciate any comments.
thanks,
wes
I have a question regard the bidiagonalization portion of the SVD algorithm, specifially the following code:
for(l=k;l>=1;l--)
{
nm=l-1;
if((float)(fabs(rv1[l])+anorm)==anorm)
{
flag=0;
break;
}
if((float)(fabs(w[nm])+anorm)==anorm)
break;
}
Here, l ranges from k:1, so nm ranges from k-1:0. Also, w is a vector with indices from 1:n. So, it would seem that in the second if statement, we would be asking for w[0] which doesn't exists. Am I correct here? This seems like an error to me. I would appreciate any comments.
thanks,
wes