matlab请看一下这个程序,有错误,不会改%f3.m文件function y=f3(p)p=1:10;if abs(p)>=2 f3=0else if abs(p)=1&abs(p) G:\matlab\MATLAB6\work\UntitledZHEXIAN.mOn line 22 ==> k(t)=sum(Z(n)*f3(t-n))出错了,怎么改呢
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/27 03:34:31
![matlab请看一下这个程序,有错误,不会改%f3.m文件function y=f3(p)p=1:10;if abs(p)>=2 f3=0else if abs(p)=1&abs(p) G:\matlab\MATLAB6\work\UntitledZHEXIAN.mOn line 22 ==> k(t)=sum(Z(n)*f3(t-n))出错了,怎么改呢](/uploads/image/z/810841-49-1.jpg?t=matlab%E8%AF%B7%E7%9C%8B%E4%B8%80%E4%B8%8B%E8%BF%99%E4%B8%AA%E7%A8%8B%E5%BA%8F%2C%E6%9C%89%E9%94%99%E8%AF%AF%2C%E4%B8%8D%E4%BC%9A%E6%94%B9%25f3.m%E6%96%87%E4%BB%B6function+y%3Df3%28p%29p%3D1%3A10%3Bif+abs%28p%29%3E%3D2++++f3%3D0else+if+abs%28p%29%3D1%26abs%28p%29+G%3A%5Cmatlab%5CMATLAB6%5Cwork%5CUntitledZHEXIAN.mOn+line+22++%3D%3D%3E+++++++++k%28t%29%3Dsum%28Z%28n%29%2Af3%28t-n%29%29%E5%87%BA%E9%94%99%E4%BA%86%2C%E6%80%8E%E4%B9%88%E6%94%B9%E5%91%A2)
matlab请看一下这个程序,有错误,不会改%f3.m文件function y=f3(p)p=1:10;if abs(p)>=2 f3=0else if abs(p)=1&abs(p) G:\matlab\MATLAB6\work\UntitledZHEXIAN.mOn line 22 ==> k(t)=sum(Z(n)*f3(t-n))出错了,怎么改呢
matlab请看一下这个程序,有错误,不会改
%f3.m文件
function y=f3(p)
p=1:10;
if abs(p)>=2
f3=0
else if abs(p)=1&abs(p) G:\matlab\MATLAB6\work\UntitledZHEXIAN.m
On line 22 ==> k(t)=sum(Z(n)*f3(t-n))
出错了,怎么改呢
matlab请看一下这个程序,有错误,不会改%f3.m文件function y=f3(p)p=1:10;if abs(p)>=2 f3=0else if abs(p)=1&abs(p) G:\matlab\MATLAB6\work\UntitledZHEXIAN.mOn line 22 ==> k(t)=sum(Z(n)*f3(t-n))出错了,怎么改呢
除了1楼说的地方,还要把"p=1:10”这句去掉.你把调用的子函数另外存一个m文件,存成f3.m,也就是现在存两个m文件一个是f3.m另一个是主函数的m文件,然后复制我底下改的,就可以了.我已经运行过的,没问题.
function y=f3(p)
if abs(p)>=2
y=0
else if abs(p)=1&abs(p)