issue in the use of chol in SPM

2 views (last 30 days)
coriandre vilain
coriandre vilain on 20 Mar 2018
Edited: coriandre vilain on 20 Mar 2018
Hi every one
As a user of spm(statistical parameter mapping), a matlab program for the analysis of fMRI, EEG or MEG data, I experienced a weird issue with the chol function. SPM uses cholesky factorisation to display brain images and it appears that the chol function can have different output depending on the matlab version and/or platform. To explain, if I try to display the same image with spm in matlab version 8.2.0.701 (R2013b) under a MACI64 computer, the chol function will give an error message, whereas it will go perfectly well when using matlab version 8.5.0.197613 (R2015a) under a PCWIN64 computer.
I do guess it's a matter of version but I would like to get some explanation if possible about this issue.
Here is the matrix to process :
R =
-0.6864 -0.0203 -0.0347
0.0221 -0.6862 -0.0364
-0.0329 -0.0368 0.6982
And here are the results of the chol(R'*R) function :
  • In matlab version 8.2.0.701 (R2013b) under a MACI64:
K>> chol(R'*R)
Error using chol
Matrix must be positive definite.
  • In matlab version 8.5.0.197613 (R2015a) under a PCWIN64 computer :
K>> chol(R'*R)
ans =
0.6875 -0.0000 -0.0000
0 0.6875 -0.0000
0 0 0.7000
Best
Coriandre

Answers (0)

Categories

Find more on Neuroimaging 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!