求多项式在一定范围内的根,怎样优化?。

4 visualizaciones (últimos 30 días)
nokopa
nokopa el 21 de Nov. de 2022
想求四次方程a*x^4+b*x^3+c*x^2+d*x+e=0在某已知区间[a1,a2]内的根。初步想法是:先按一般方法求出所有根:
p=[a b c d e];
q=roots(p);
然后筛选出来:
onlyx=q(find(q>=a1&q<=a2));
但是这一步要循环很多次,希望能优化算法节省时间,只求[a1,a2]范围内的根。求大神指教~~

Respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!