MATLAB: Solving a Cubic Equation

cubiccubicequationequation

I am new to Matlab and I can't work out how to solve this cubic equation.
(Q/Qw)^3-(Q/Qw)-(1/F^3)=0.
I have Qw and F both as 1×108 matrices and I am trying to solve this equation for Q.
I would like to be able to see the answers in Q as numbers as to extract them so Q/Qw against f could be plotted.
Any help would be much appreciated.

Best Answer

The built-in function roots is what you're looking for.