Cannot create a matrix using pinv.

2 次查看(过去 30 天)
I want to find the inverse function of the MxN matrix using the pinv function.
However, a message indicating that the creation of the matrix has failed is displayed, which is as follows."SVD values do not converge"
The matrix is a full rank matrix.
Is this why I can't build a pseudo inverse matrix?Or is there any other reason that I can't create a pseudo inverse matrix?
  1 个评论
Matt J
Matt J 2021-1-19
I suggest that you attach the matrix in a .mat file, so that we can examine it.

请先登录,再进行评论。

回答(1 个)

Christine Tobler
Christine Tobler 2021-1-19
You've hit on a rare matrix that the SVD algorithm isn't able to work with (the SVD being the factorization called withing the PINV function). Please attach the matrix here or send it to Tech Support as a bug report. If you can also tell us your MATLAB release and operating system, that would be very helpful.
  4 个评论
Christine Tobler
Christine Tobler 2021-1-20
Hi,
I just tried to reprocude this and didn't see the error in either 2019a or 2018b. This is likely to be machine specific.
Could you tell me what operating system you are using and also enter the line
>> version -lapack
in MATLAB and send me the printout that MATLAB returns? This should help me to try and reproduce this.
The reason you can get the inverse but not the pseudoinverse is that different decompositions are used to compute these two. The pseudoinverse is the more expensive algorithm. Since the matrix here is very well conditioned, both the inverse and the pseudoinverse will be the same, so you would be save just using INV here.
Christine Tobler
Christine Tobler 2021-1-20
A colleague was able to reproduce this (using Windows on an Intel machine with AVX2 instructions). He could reproduce this in R2019a, but not anymore in R2019b. So this is fixed from R2019b onward.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by