早教吧 育儿知识 作业答案 考试题库 百科 知识分享

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