MATLAB问题 function [f,k]=sconv(f1,f2,k1,k2,p) f=conv(f1,f2); k0=k1(1)+k2(1); k3=k1(length(f1)+k2(lfunction [f,k]=sconv(f1,f2,k1,k2,p)f=conv(f1,f2);k0=k1(1)+k2(1);k3=k1(length(f1)+k2(length(f2)))k=k0:p:k3;function heaviside(t,t0)f=(t-t0>0);n=-5:50;
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/15 21:24:24
MATLAB问题 function [f,k]=sconv(f1,f2,k1,k2,p) f=conv(f1,f2); k0=k1(1)+k2(1); k3=k1(length(f1)+k2(lfunction [f,k]=sconv(f1,f2,k1,k2,p)f=conv(f1,f2);k0=k1(1)+k2(1);k3=k1(length(f1)+k2(length(f2)))k=k0:p:k3;function heaviside(t,t0)f=(t-t0>0);n=-5:50;
MATLAB问题 function [f,k]=sconv(f1,f2,k1,k2,p) f=conv(f1,f2); k0=k1(1)+k2(1); k3=k1(length(f1)+k2(l
function [f,k]=sconv(f1,f2,k1,k2,p)
f=conv(f1,f2);
k0=k1(1)+k2(1);
k3=k1(length(f1)+k2(length(f2)))
k=k0:p:k3;
function heaviside(t,t0)
f=(t-t0>0);
n=-5:50;
u1=heaviside(n,0);
u2=heaviside(n,10);
x=u1-u2;
h=(0.9.^n).*u1;
[y,ny]=sconv(x,h,n,n,1);
subplot(3,1,1);stem(n,x)
subplot(3,1,2);stem(n,h)
subplot(3,1,3);stem(y,ny)
Error using ==> heaviside
Too many output arguments.
Error in ==> ll5 at 2
u1=heaviside(n,0);
题目h(n)=((0.9)^n)*u[n],输入x[n]=u[n]-u[n-10],求系统输出y[n]=x[n]*h[n] 一二部分就是设定 第三部分主函数
MATLAB问题 function [f,k]=sconv(f1,f2,k1,k2,p) f=conv(f1,f2); k0=k1(1)+k2(1); k3=k1(length(f1)+k2(lfunction [f,k]=sconv(f1,f2,k1,k2,p)f=conv(f1,f2);k0=k1(1)+k2(1);k3=k1(length(f1)+k2(length(f2)))k=k0:p:k3;function heaviside(t,t0)f=(t-t0>0);n=-5:50;
你的主函数,和heaviside函数都放上来我才好调试
或你的f1,f2,k1,k2,p这些参数给传上了