matlab求一元函数零点f=4.268x^3-4.987x^2+1.786x+2.039-2.23978在区间[0.2,0.36]的零点

来源:学生作业帮助网 编辑:六六作业网 时间:2024/10/04 22:41:04
matlab求一元函数零点f=4.268x^3-4.987x^2+1.786x+2.039-2.23978在区间[0.2,0.36]的零点matlab求一元函数零点f=4.268x^3-4.987x^

matlab求一元函数零点f=4.268x^3-4.987x^2+1.786x+2.039-2.23978在区间[0.2,0.36]的零点
matlab求一元函数零点
f=4.268x^3-4.987x^2+1.786x+2.039-2.23978在区间[0.2,0.36]的零点

matlab求一元函数零点f=4.268x^3-4.987x^2+1.786x+2.039-2.23978在区间[0.2,0.36]的零点
>> f=@(x)4.268*x.^3-4.987*x.^2+1.786*x+2.039-2.23978;
>> x=fsolve(f,[0.2 0.36])
Equation solved.
fsolve completed because the vector of function values is near zero
as measured by the default value of the function tolerance,and
the problem appears regular as measured by the gradient.

x =
0.2432 0.3192
>> feval(f,x)
ans =
1.0e-008 *
-0.9783 -0.0001