. The roots of that give you the critical points; call those Cubic Fit to minimize a polynomial
4 次查看(过去 30 天)
显示 更早的评论
hi,
using "cubic fit" calculate : min x^4 + 2*x + 4
i need some guidance how to code this?
i have searched and found this formulation for cubic fit
0 个评论
采纳的回答
Walter Roberson
2020-8-12
Use calculus. To find min(f(x)) then solve
. The roots of that give you the critical points; call those
for the moment. Then, examine
. Positive values indicate that the corresponding
was a minima.
. The roots of that give you the critical points; call those For a degree 4 polynomial, the derivative is degree 3, and there are closed form solutions for the roots of a polynomial of degree 3. Therefore you can calculate the exact critical points, and test them.
You will only find one real-valued root. You might assume that it must be the minima, but in the general case, it will not be a safe assumption.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!