When we have two symmetric matrices x and y, the matrix z = xyx is theoretically also symmetric. However this is not exactly true in Matlab:
x = randn(3);
y = randn(3);
x = x*x';
y = x*x';
z = x*y*x;
issymetric(z)
Why does this happen and what can I do about it? Since I do not want to do
z = .5*(z+z')
all anwers in this stackoverflow question are unsatisfactionary.