MATLAB: Using the solve function to solve for x in a quadratic

equationMATLABquadraticsolveSymbolic Math Toolbox

I'm having a few problems using the solve function to solve my quadratic equation.
It's quite basic but still causing problems for me.
This is my code:
syms x positive
B=13.69515; A=1.01; Delta=7.425 n=354.375; a0=-0.01660;
solve(a0*x^2-(B/A-Delta)*x +n,x);
When this is run it returns:
ans =
(75*2^(1/2)*346625777^(1/2))/8383 – 1548975/8383
which is fine but I need the single value answer, not that string type answer.
For example, if I say,
Q=(75*2^(1/2)*346625777^(1/2))/8383 – 1548975/8383
I get the answer I need which is 50.7873
How I get this single answer first time around without getting that string. I'm sure it is something simple but I'm a bit of a novice so I'm unsure.
Thanks for any help!

Best Answer

double() will convert a symbolic number to a double precision value.