这段MATLAB代码有没有错误,为什么总是不能运行?ezplot('7.092*tan(x)*tan(7.092*0.429*x)-1',[0 10]);hold on;plot([0 10],[0 0])f=@(x)7.092*tan(x)*tan(7.092*0.429*x)-1;x=[];for i=1:4x0=[0.254 1.039 2.032 2.91];gen=fsolve(f,x0(i));x

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 22:04:13
这段MATLAB代码有没有错误,为什么总是不能运行?ezplot('7.092*tan(x)*tan(7.092*0.429*x)-1',[0 10]);hold on;plot([0 10],[0 0])f=@(x)7.092*tan(x)*tan(7.092*0.429*x)-1;x=[];for i=1:4x0=[0.254 1.039 2.032 2.91];gen=fsolve(f,x0(i));x

这段MATLAB代码有没有错误,为什么总是不能运行?ezplot('7.092*tan(x)*tan(7.092*0.429*x)-1',[0 10]);hold on;plot([0 10],[0 0])f=@(x)7.092*tan(x)*tan(7.092*0.429*x)-1;x=[];for i=1:4x0=[0.254 1.039 2.032 2.91];gen=fsolve(f,x0(i));x
这段MATLAB代码有没有错误,为什么总是不能运行?
ezplot('7.092*tan(x)*tan(7.092*0.429*x)-1',[0 10])
;
hold on;
plot([0 10],[0 0])
f=@(x)7.092*tan(x)*tan(7.092*0.429*x)-1;
x=[];
for i=1:4
x0=[0.254 1.039 2.032 2.91];
gen=fsolve(f,x0(i));
x=[x;gen];
end

这段MATLAB代码有没有错误,为什么总是不能运行?ezplot('7.092*tan(x)*tan(7.092*0.429*x)-1',[0 10]);hold on;plot([0 10],[0 0])f=@(x)7.092*tan(x)*tan(7.092*0.429*x)-1;x=[];for i=1:4x0=[0.254 1.039 2.032 2.91];gen=fsolve(f,x0(i));x

你的matlab版本太旧了吧,没有ezplot函数啊……

把ezplot.m文件发给你,你放到toolbox里再试试吧~