MATLAB: How to simplify the numerical portion of the symbolic expression using Symbolic Math Toolbox 3.2 (R2007a)

Symbolic Math Toolbox

I have the following code:
syms m k Fo
Q = [1 1 1;1 -0.391965641 -2.61803398; 1 -1.236067977 3.236067968]
M = [m 0 0; 0 m 0; 0 0 m/2]
K = [k -k 0; -k 2*k -k; 0 -k k]
K = [k -k 0; -k 2*k -k; 0 -k k]
F = [Fo 0 0]'
F = [Fo; 0; 0]
Mg = Q'*M*Q
I am unable to simplify 'Mg' using PRETTY, SIMPLE or SIMPLIFY.
simplify(Mg)

Best Answer

You can make use of variable precision arithmetic to simplify the numerical portion of your expression.
For example:
vpa(Mg,5) %Compute each element of Mg to 5 decimal digits of accuracy