Vector to lower-triangular matrix
조회 수: 11 (최근 30일)
이전 댓글 표시
Hello.
Im trying to estimate multivariate normal distribution. Correlation matrix is one of the parameters, and I need to have all parameters in a vector for fmincon.
I can vectorize a lower-triangular of correlation matrix, indeed, but how do I do an opposite?
I mean, I have a matrix C - a correlation matrix:
1 c12 c13
C = c12 1 c23
c13 c23 1
Then I do:
a = tril(C,-1);
a = a(:);
b = a(a(:)>0);
b = [c12; c13; c23];
I get b - a vectorized lower-triangular matrix. How can I do an opposite (for matrices of any dimensions)? To get a lower-triangular matrix from a vector? Thanks!
댓글 수: 0
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!