After updating matlab to R2019a, my matlab cannot solve AX=b.

1 次查看(过去 30 天)
Greetings,
Currently, I am building an improved primal-dual path following algorithm. I need to solve a AX=b matrix equations, where A is a singular matrix. Because the defition of primal-dual path following algorithm, it is very hard to avoid the singular matrix.
When I used matlab R2018 version, although the condition number of A is inf, I still can solve X = A\b and get specific number. However, after I updated to matlab R2019a, I will get X = [nan ... nan] if I solve X = A\b same for X = A^-1 * b and X = inv(A) * b.
It is very important to my research and I have finished half of my project. But now I cannot repeat my work.
Could anyone help me? Thank you very much!
  3 个评论
Xin Shen
Xin Shen 2019-7-10
编辑:Xin Shen 2019-7-10
Thank you very much!The zip files are a short version of my code.
It has actual meaning and has been validated. We tried to solve a linear progamming problem and the solution is sufficiently close to the optimal solution.
When I used the matlab R2018a on my desktop, it works. Afert I updated to R2019a yesterday, it did not work. On my friend's laptop R2016b, it also does not work.
Program can be started from the main.m. The main difference is in program PrimalDualMethod.m. At iteration 26 (iterN=26) of PrimalDualMethod.m, old version gives me results and new version gives me a vector with nan at Line 118 "dxy(pm, :) = L'\(D\(L\(rhs(pm, :))))". It could be the singular AX=b or other reasons.
Xin Shen
Xin Shen 2019-7-10
编辑:Xin Shen 2019-7-10
Sorry, I did some extra tests on my frined matlab R2016b and found more information.
I used same A and b generated by (R2019a) to test on my friend matlab R2016b, and it does not work.
If I test the all zip files I posted on my friend matlab R2016b, it gives correct solution.
So I think it is version problem and Line 118 to solve AX = b is not the true reason.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by