Simulink Singular Value Decomposition (SVD) Bug?

8 views (last 30 days)
Hi,
I have a matrix that when passed through a SVD simulink block would return a V matrix (specifically, the last column is the negative of the other) that differs from one that is returned in Matlab (even when using the econ option)...
I work in the same workspace ie, I'm using the source block to define the matrix in Simulink...
I have tested several a few matrices, run into the same issue everytime.
An example matrix is [1.0916 0.0595 -0.0324; 0.0595 1.0386 -0.0210; -0.0324 -0.0210 0.0115]
This would give a different v matrix in Matlab than one given in Simulink...
I haven even tried running a embedded Matlab function using svd and still ran into the same problem.
I am using R2008B, doubt this is an issue???
Thanks!

Accepted Answer

Wayne King
Wayne King on 4 Aug 2012
It's not a bug, the difference you see is simply the signs on the elements of u are the opposite, but that is also true for the v matrix, so that
u*s*v' still gives you the factorization of the input matrix
If you look at the output of svd() and compare that to the SVD block in the Signal Processing Blockset, the elements of u and v are equal in magnitude but opposite in sign. The singular values are the same.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!