求多项式在一定范围内的根,怎样优化?。
Afficher commentaires plus anciens
想求四次方程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]范围内的根。求大神指教~~
Réponses (0)
Catégories
En savoir plus sur 基于问题的优化设置 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!