Matrix must be a positive definite (geometry problem)
3 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Erik S.
on 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 Comments
More Answers (0)
See Also
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!