0
$\begingroup$

I want to separate into two matrices in Matlab like this:

$$ Q=Sq^{T}Sq $$ for example this matrix: $$ Q=\Biggm[\matrix{92.316 &31.78&240.417\cr 31.78 &194.66 &275.47\cr 240.417 &275.47 &938.99}\Biggm] $$

$\endgroup$

1 Answer 1

1
$\begingroup$

You can the Cholesky factorization.

In matlab its very easy.

A= [92.316 31.78 240.417; 31.78  194.66 275.47; 240.417 275.47 938.99]
B=chol(A)
B'*B
$\endgroup$
2
  • $\begingroup$ chol in Matlab is only used for positive definite matrix. if the matrix is not positive definite, what can I do? $\endgroup$
    – user212662
    Commented Mar 31, 2021 at 10:05
  • $\begingroup$ You need to state that in your question. The example you had could be decomposed. To be honest, I've never had to use it for not positive definite, so you'd best update the answer and there are other people that can help you. $\endgroup$
    – NMech
    Commented Mar 31, 2021 at 10:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.