作业帮 > 综合 > 作业

matlab问题,把下列程序中的n1=0:n-1;把n-1换成5,怎么运行出错了,同理n2,n3都换掉

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/07/19 04:27:26
matlab问题,把下列程序中的n1=0:n-1;把n-1换成5,怎么运行出错了,同理n2,n3都换掉
x=[2,3,4,5,6,7]; h=[3,5,3,4,5];
n=6;m=5;l=10;
n1=0:n-1;n2=0:m-1;n3=0:l-1;
y=conv(x,h);
subplot(131);stem(n1,x);grid on;title('x(n)');
subplot(132);stem(n2,h);grid on;title('h(n)');
subplot(133);stem(n3,y);grid on;title('y(n)');
matlab问题,把下列程序中的n1=0:n-1;把n-1换成5,怎么运行出错了,同理n2,n3都换成具体数值,怎么算是错误的.
没错吧,你用的是什么版本,我的那个matlab没错


再问: 用的7.0版本,把n1,n2,n3换掉就有错了,不知道为什么啊 n=6;m=5;l=10; n1=0:5;n2=0:4;n3=0:10; y=conv(x,h);
再答: 给报错的信息看看
再问: 我知道错在那里了。。。