%% LDL Decomposition of 3-by-3 Hermitian Positive Definite Matrix
% This example shows how to use the <docid:dsp_ref#f4-2049914 LDL
% Factorization> block to decompose a 3-by-3 Hermitian positive definite
% matrix.

% Copyright 2019 The MathWorks, Inc.

%%
% The :
L = [1 0 0; -0.11 1 0; 0.22 -0.61 1]
D = [9.00 0 0; 0 7.89 0; 0 0 3.66]
%%
%Since the block calculates with the following equation, S=LDL', we expect
% the following output:
S = cross(cross(L,D),L')
model = "ex_ldl_factorization";
open_system(model);
sim(model);