MATLAB: How to calculate the determinant of a symbolic matrix 5×5

symbolic matrix determinant

Suppose we have a symmetric,real matrix,K 5×5: K = [0 0 0 F 0; 0 0 F E 0;0 F E D 0;F E D C 0;0 0 0 0 A]
A,C,D,E,F are matrices (their size does not matter to me). How can i say to matlab to consider these entries as matrices and thereafter calculating the determinant of K ?

Best Answer

I don't think it is possible to concatenate a matrix such as K if A-F have sizes > (1,1), thus no value of the determinant exist. This is because if e.g., [E] exists, then K(1,:)=[0 0 0 F 0] and K(2,:)=[0 0 F E 0] must be the same size, hence (E = [E], e.f., E is 1 by 1 matrix).
If the matrix K do exist, please explain further what is the shape of A-F sub matrices.
Otherwise just use the regular concatenation functions (cat, vertcat or horzcat) to construct K from A-F submatrices, and det(K) to find the determinant.