help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] gsl_linalg_cholesky_decomp Issues


From: Jordi Gutiérrez Hermoso
Subject: Re: [Help-gsl] gsl_linalg_cholesky_decomp Issues
Date: Wed, 16 Feb 2011 07:58:54 -0600

On 15 February 2011 15:01, Rob <address@hidden> wrote:
> Could someone help me to figure out what's going on here? I keep getting the
> error "gsl: cholesky.c:157: ERROR: matrix must be positive definite Default
> GSL error handler invoked. Aborted" though I've tested the same calculations
> in Matlab and they work fine. Any thoughts? Thanks.

Your matrix is 4x4 and mostly zeros except for the upper left 2x2
block. That is not positive definite and Octave (eewww, Matlab?)
agrees. Change line

       gsl_matrix *epsilon = gsl_matrix_calloc(4,4);

to

       gsl_matrix *epsilon = gsl_matrix_calloc(2,2);

HTH,
- Jordi G. H.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]