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

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/10 07:27:55

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