I am working with a piece of Matlab where I have:
n = 4;
Mbar = zeros(n,n);
Mbar(1,1) = M;
Mbar(2,2) = Ixx;
Mbar(3,3) = Iyy;
Mbar(4,4) = Izz;
L = zeros(n,n);
L = chol(Mbar)';
An error message said that it didn't like M, Ixx, Iyy, and Izz. So I changed the code to:
syms M Ixx Iyy Izz;
assume(M>0);
assume(Ixx>0);
assume(Iyy>0);
assume(Izz>0);
M = vpa(Mbar(1,1));
Ixx = vpa(Mbar(2,2));
Iyy = vpa(Mbar(3,3));
Izz = vpa(Mbar(4,4));
L = zeros(n,n);
L = chol(Mbar)';
An error message was returned stating that Mbar must be positive definite for the Cholesky decomposition to be performed. Is there a way to define the variables in Mbar such that I am ensured that Mbar is positive definite?
L = chol(Mbar)';
– Lanae Nov 09 '13 at 22:23which sym/cholreturn? Do you get a help result forhelp sym/chol? – horchler Nov 10 '13 at 17:29