MATLAB: Does vpasolve work where solve doesn’t for the following:

mathematicssymbolicSymbolic Math Toolbox

When I pass the following equations into solve like so
eqn1 = (120*Lt*pi*Rt)/(14400*Lt^2*pi^2 + Rt^2)^(1/2) - 338920901889975/17592186044416
eqn2 = (42000*Lt*pi*Rt)/(1764000000*Lt^2*pi^2 + Rt^2)^(1/2) - 8473022547249375/17592186044416
S = solve([eqn1,eqn2],[Rt, Lt])
I get the following error:
Warning: 4 equations in 2 variables.
> In C:\Program Files (x86)\MATLAB\R2013a Student\toolbox\symbolic\symbolic\symengine.p>symengine at 56
In mupadengine.mupadengine>mupadengine.evalin at 97
In mupadengine.mupadengine>mupadengine.feval at 150
In solve at 170
In Main at 152
Warning: Explicit solution could not be found.
> In solve at 179
In Main at 152
However, if I plug these same two equations into vpasolve like so
S = vpasolve([eqn1, eqn2], [Rt, Lt], [1e3, 1e-6]);
I get
double(S.Rt) = 482.866983 and
double(S.Lt) = 0.051144.
What am I doing wrong inside the solve function??? Thanks for any help.

Best Answer

Hey everyone,
It turns out, not surprisingly, that I needed to make eqn1 and eqn2 symbolic objects, which I did by wrapping sym() around each one. Now everything works fine. Yippee!
eqn1 = sym((120*Lt*pi*Rt)/(14400*Lt^2*pi^2 + Rt^2)^(1/2) - 338920901889975/17592186044416)
eqn2 = sym((42000*Lt*pi*Rt)/(1764000000*Lt^2*pi^2 + Rt^2)^(1/2) - 8473022547249375/17592186044416)
S = solve([eqn1, eqn2])