作业帮 > 英语 > 作业

matlab中提示The length of X must match the number of rows of Y

来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/07/18 05:38:59
matlab中提示The length of X must match the number of rows of Y
clear all;close all;clc;
k=0:6;
a=[1 3 2];
b=[1];
h=impz(b,a,k);
g=stepz(b,a,k);
subplot(2,1,1);stem(k,h);grid on;title('h[k]');xlabel('k');ylabel('h');
subplot(2,1,2);stem(k,g);grid on;title('g[k]');xlabel('k');ylabel('g');
最后一个图没图像···怎么改··
clear all;
close all;
clc;
k=6;
a=[1 3 2];
b=[1];
[h t]=impz(b,a,k);
[g t]=stepz(b,a,k);
subplot(2,1,1);stem(t,h);grid on;title('h[t]');xlabel('t');ylabel('h');
subplot(2,1,2);stem(t,g);grid on;title('g[t]');xlabel('t');ylabel('g');
按上面语句试试