A=fc_amat.random.randnsympd(100,4);
D=det(A);
[L,U,P]=lu(A);
E1=abs(L*U-P*A);
fprintf('max of E1 elements: %.6e\n',max(E1(:)))
R=chol(A);
E2=abs(R'*R-A);
fprintf('max of E2 elements: %.6e\n',max(E2(:)))
b=ones(4,1);
X=A\b;
E3=abs(A*X-b);
fprintf('max of E3 elements: %.6e\n',max(E3(:)))
B=fc_amat.random.randn(100,4,1);
Y=A\B;
E4=abs(A*Y-B);
fprintf('max of E4 elements: %.6e\n',max(E4(:)))
whos
max of E1 elements: 3.552714e-15
max of E2 elements: 7.105427e-15
max of E3 elements: 4.884981e-15
max of E4 elements: 1.398881e-14
Name Size Bytes Class Attributes
A 100x4x4 12832 amat
B 100x4x1 3232 amat
C 4x5 160 double
D 100x1x1 832 amat
D1 100x3x2 4832 amat
D2 100x3x5 12032 amat
D3 100x3x4 9632 amat
E1 100x4x4 12832 amat
E2 100x4x4 12832 amat
E3 100x4x1 3232 amat
E4 100x4x1 3232 amat
L 100x4x4 12832 amat
P 100x4x4 12832 amat
R 100x4x4 12832 amat
U 100x4x4 12832 amat
X 100x4x1 3232 amat
Y 100x4x1 3232 amat
ans 1x71 142 char
b 4x1 32 double
codes 1x6 840 cell
demo 1x32 64 char
demofile 1x16 32 char
i 1x1 8 double