这段MATLAB代码有没有错误,为什么总是不能运行?
来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/07/16 21:31:43
这段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
![](http://img.wesiedu.com/upload/a/da/adae2e8395a379a6a787d1ae2af63548.jpg)
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
![](http://img.wesiedu.com/upload/a/da/adae2e8395a379a6a787d1ae2af63548.jpg)
![这段MATLAB代码有没有错误,为什么总是不能运行?](/uploads/image/z/14695916-68-6.jpg?t=%E8%BF%99%E6%AE%B5MATLAB%E4%BB%A3%E7%A0%81%E6%9C%89%E6%B2%A1%E6%9C%89%E9%94%99%E8%AF%AF%2C%E4%B8%BA%E4%BB%80%E4%B9%88%E6%80%BB%E6%98%AF%E4%B8%8D%E8%83%BD%E8%BF%90%E8%A1%8C%3F)
你的matlab版本太旧了吧,没有ezplot函数啊……把ezplot.m文件发给你,你放到toolbox里再试试吧~