Matrix must be a positive definite (geometry problem)
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
GHULAM RASOOL
am 9 Feb. 2015
Beantwortet: Erik S.
am 9 Feb. 2015
Hi, The code i m using is originally for flow past half cylinder. i need to change the geometry so that the semi circle is replaced by half triangle. when i make this change by modifying geometry coordinates i get an error as follows:
Error using ==> chol
Matrix must be positive definite.
Error in ==> ellipt1 at 35
R = chol(A); Y = R'\B; Z = R\Y;
Error in ==> demo2 at 67
ZN = ellipt1(p,t,RDZ,[],W);
The part of the code where this 'chol' function is used and the geometry code is shown in the figures below:
0 Kommentare
Akzeptierte Antwort
Erik S.
am 9 Feb. 2015
Hi,
If you are sure the problem is set up correctely you can solve with the general solver:
Z = A\B;
Chol can only be used for special cases when your matrix A has special properties (Symmetric and positive definite). Most matrices are not and than you have to use the \ operator.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numerical Integration and Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!