MATLAB: Do I get a fraction instead of a rational number when I solve two simple simultaneous equations

MATLABsystems of linear equations

These are the two equations I need to solve; for A and B, to calculate the viscosity of hydraulic fluid between to temperatures. The results are correct, but why does Matlab show them as fractions and not rational numbers?
syms A B
eqn1=A-520*B==3.7612;
eqn3=A-560*B==2.3026;
[X,Y] = equationsToMatrix([eqn1, eqn3], [A, B])
Z = linsolve(X,Y)
Z =
22723/1000
7293/200000
>> 22723/1000
ans =
22.7230
>> 7293/200000
ans =
0.0365

Best Answer

Because you are (for some irrational reason) using symbolic computations to solve a simple linear system of equations. Sort of equivalent to the use of a Mack truck to bring a single pea to Boston - massive overkill. Therefore the result is a symbolic one, and is left in symbolic form.
If you want to convert it to a floating point number, then use vpa, or use double.