matlab高手看看怎么求这个函数的最大值dy =0.000099261901556999720041760126854058*bbb^5 - 0.0023305907031025767622671451828609*bbb^4 - 0.025259643140202740069222286933837*bbb^3 + 0.81623253924995070596182245026284*bbb^2 - 3.66326010440757
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/09 07:23:25
matlab高手看看怎么求这个函数的最大值dy =0.000099261901556999720041760126854058*bbb^5 - 0.0023305907031025767622671451828609*bbb^4 - 0.025259643140202740069222286933837*bbb^3 + 0.81623253924995070596182245026284*bbb^2 - 3.66326010440757
matlab高手看看怎么求这个函数的最大值
dy =0.000099261901556999720041760126854058*bbb^5 - 0.0023305907031025767622671451828609*bbb^4 - 0.025259643140202740069222286933837*bbb^3 + 0.81623253924995070596182245026284*bbb^2 - 3.6632601044075792096066379599506*bbb + 6.5229679256533339426482598355506
这是一个一元5次方程 我怎么求得 在1-20中的最大值
matlab高手看看怎么求这个函数的最大值dy =0.000099261901556999720041760126854058*bbb^5 - 0.0023305907031025767622671451828609*bbb^4 - 0.025259643140202740069222286933837*bbb^3 + 0.81623253924995070596182245026284*bbb^2 - 3.66326010440757
从图形来看,方程的最大值在x=10的附近
用fminsearch()求得,x =10.9780883789063,y = 13.2348950693333
函数定义:
func=inline('-(0.000099261901556999720041760126854058*x^5 - 0.0023305907031025767622671451828609*x^4 - 0.025259643140202740069222286933837*x^3 + 0.81623253924995070596182245026284*x^2 - 3.6632601044075792096066379599506*x + 6.5229679256533339426482598355506)','x')
求最大值
[x,g]=fminsearch(func,10)
x =
10.9780883789063
g =
-13.2348950693333