Matrix must be a positive definite (geometry problem)

3 visualizzazioni (ultimi 30 giorni)
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:

Risposta accettata

Erik S.
Erik S. il 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.

Più risposte (0)

Categorie

Scopri di più su Numerical Integration and Differential Equations in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by