MATLAB: How to solve solve an equation for the first complex root

complex rootsempty symexplicit solutionMATLAB

I need to be able to solve the following equation for its first root
15.36*L^2 + L*(19592.58957620995934121310710907*i – 1919917.6232407807483900796796661) + (14998852.92303687865065071910875 – 82922.533414158501558648943613169*i)
However, when I use the solve function
solve(15.36*L^2 + L*(19592.58957620995934121310710907*i – 1919917.6232407807483900796796661) + (14998852.92303687865065071910875 – 82922.533414158501558648943613169*i))
Warning: Explicit solution could not be found.
> In solve at 169
ans =
[ empty sym ]
is displayed.
I know the answer is L=7.81235+.0365383i. How can I make MATLAB display this answer?

Best Answer

You’re not asking it correctly:
syms L
p = 15.36*L^2 + L*(19592.58957620995934121310710907*i - 1919917.6232407807483900796796661) + (14998852.92303687865065071910875 - 82922.533414158501558648943613169*i);
L = roots(sym2poly(p))
L =
124.9868e+003 - 1.2756e+003i
7.8124e+000 + 36.5383e-003i