CULA Dense: Different Results From MATLAB

General CULA Dense (LAPACK & BLAS) support and troubleshooting. Use this forum if you are having a general problem or have encountered a bug.

CULA Dense: Different Results From MATLAB

Postby sgar91 » Tue Jan 08, 2013 4:06 am

I'm using CULA Dense free version to perform SVD of a matrix. My input matrix is in row-major format, but before calling the culaDeviceGesvd function, I convert the matrix to column major order. I compared the output with MATLAB function svd. The singular values are exactly same in both. However, the U and V matrices have their first columns multiplied by -1.0. I have no idea why the result of CULA is different from MATLAB. Please help.
sgar91
 
Posts: 1
Joined: Tue Jan 08, 2013 3:57 am

Re: CULA Dense: Different Results From MATLAB

Postby kyle » Tue Jan 08, 2013 7:43 am

Both answers are most likely correct. Slightly different algorithms might be used under the hood or differences in floating point associativity might have compounded.

However, both U and V should be orthogonal (U*U' = I, V*V' = I) and the SVD identity should hold true (A=U*S*Vt).
kyle
Administrator
 
Posts: 301
Joined: Fri Jun 12, 2009 7:47 pm

Re: CULA Dense: Different Results From MATLAB

Postby john » Tue Jan 08, 2013 7:48 am

To add to that, U and V are not unique matrices in the SVD. You should expect that different implementations will yield different U and V matrices.
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm


Return to CULA Dense Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron