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

1 Ansicht (letzte 30 Tage)
Xin Shen
Xin Shen am 10 Jul. 2019
Bearbeitet: Xin Shen am 10 Jul. 2019
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 Kommentare
Xin Shen
Xin Shen am 10 Jul. 2019
Bearbeitet: Xin Shen am 10 Jul. 2019
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 am 10 Jul. 2019
Bearbeitet: Xin Shen am 10 Jul. 2019
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by