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

4 Ansichten (letzte 30 Tage)
nokopa
nokopa am 21 Nov. 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]范围内的根。求大神指教~~

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!