如何用MATLAB 画出的图像.x[n]=n(u[n]-u[n-10])+10e^((-0.3)*(n-10))*(u[n-10]-u[n-20]),0=10); %u[n-10]c=1*(n>=20); %u[n-20]w=n*(a-b)+10*(b-c)*exp((-0.3)*(n-10));stem(n,w)我这么编的 但是出不来图.错误在W这一行.

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 13:02:05
如何用MATLAB 画出的图像.x[n]=n(u[n]-u[n-10])+10e^((-0.3)*(n-10))*(u[n-10]-u[n-20]),0=10); %u[n-10]c=1*(n>=20); %u[n-20]w=n*(a-b)+10*(b-c)*exp((-0.3)*(n-10));stem(n,w)我这么编的 但是出不来图.错误在W这一行.

如何用MATLAB 画出的图像.x[n]=n(u[n]-u[n-10])+10e^((-0.3)*(n-10))*(u[n-10]-u[n-20]),0=10); %u[n-10]c=1*(n>=20); %u[n-20]w=n*(a-b)+10*(b-c)*exp((-0.3)*(n-10));stem(n,w)我这么编的 但是出不来图.错误在W这一行.
如何用MATLAB 画出的图像.x[n]=n(u[n]-u[n-10])+10e^((-0.3)*(n-10))*(u[n-10]-u[n-20]),0=10); %u[n-10]
c=1*(n>=20); %u[n-20]
w=n*(a-b)+10*(b-c)*exp((-0.3)*(n-10));
stem(n,w)
我这么编的 但是出不来图.错误在W这一行.

如何用MATLAB 画出的图像.x[n]=n(u[n]-u[n-10])+10e^((-0.3)*(n-10))*(u[n-10]-u[n-20]),0=10); %u[n-10]c=1*(n>=20); %u[n-20]w=n*(a-b)+10*(b-c)*exp((-0.3)*(n-10));stem(n,w)我这么编的 但是出不来图.错误在W这一行.
下面的code是可以画出图来的.其实只是把*改成了.*而已.因为你是想要对每个元素作用.
subplot(5,5,6)
n=0:1:20;
a=1*(n>=0); %u[n]
b=1*(n>=10); %u[n-10]
c=1*(n>=20); %u[n-20]
w=n.*(a-b)+10.*(b-c).*exp((-0.3).*(n-10));
stem(n,w)