Simulink Singular Value Decomposition (SVD) Bug?

Illustration
Teagan - 2021-03-05T10:28:18+00:00
Question: Simulink Singular Value Decomposition (SVD) Bug?

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???

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

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.


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!