matlab 一元高次函数求最小值
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/05 17:19:44
matlab 一元高次函数求最小值
f =100*(-1+2080*e-(-3+12096*e)^2)^2+(1-(-3+12096*e)^2)^2+90*(-1+1880*e-(-3+10896*e)^2)^2+(1-(-3+10896*e)^2)^2+101/10*(-2+2080*e)^2+101/10*(-2+1880*e)^2+(-198/5+41184*e)*(-2+1880*e)
这个函数如何求最小值啊?
f =100*(-1+2080*e-(-3+12096*e)^2)^2+(1-(-3+12096*e)^2)^2+90*(-1+1880*e-(-3+10896*e)^2)^2+(1-(-3+10896*e)^2)^2+101/10*(-2+2080*e)^2+101/10*(-2+1880*e)^2+(-198/5+41184*e)*(-2+1880*e)
这个函数如何求最小值啊?
f=collect(f);
f=19288+3444818015348785152*e^4-3658660700626944*e^3+1484721286304*e^2-272896832*e%为一元四次函数.其导数为
g=diff(f,e);
g=-272896832+2969442572608*e-10975982101880832*e^2+13779272061395140608*e^3%为一元三次函数,单调递增,找出使g=0的e值就是使f取最小值的e值.
gg=inline('-272896832+2969442572608*e-10975982101880832*e^2+13779272061395140608*e^3');
c=fzero(gg,0);
ff =inline(19288+3444818015348785152*e^4-3658660700626944*e^3+1484721286304*e^2-272896832*e);
c,minf=ff(c)
c =
2.7141e-004
minf =
135.7382
f=19288+3444818015348785152*e^4-3658660700626944*e^3+1484721286304*e^2-272896832*e%为一元四次函数.其导数为
g=diff(f,e);
g=-272896832+2969442572608*e-10975982101880832*e^2+13779272061395140608*e^3%为一元三次函数,单调递增,找出使g=0的e值就是使f取最小值的e值.
gg=inline('-272896832+2969442572608*e-10975982101880832*e^2+13779272061395140608*e^3');
c=fzero(gg,0);
ff =inline(19288+3444818015348785152*e^4-3658660700626944*e^3+1484721286304*e^2-272896832*e);
c,minf=ff(c)
c =
2.7141e-004
minf =
135.7382