matlab新手求大神帮忙!%f1:f1(k)的样值向量%k1:f1(K)对应的时间向量%f2:f2(k)样值向量%k2:f2(k)对应时间向量%f3:f3(k)的样值向量%k3:f3(K)对应的时间向量k1=-5:15;f1=[zeros(1,5),ones(1,16)];subplot(3,1,1)stem(k1,f1);titl
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/15 05:26:49
![matlab新手求大神帮忙!%f1:f1(k)的样值向量%k1:f1(K)对应的时间向量%f2:f2(k)样值向量%k2:f2(k)对应时间向量%f3:f3(k)的样值向量%k3:f3(K)对应的时间向量k1=-5:15;f1=[zeros(1,5),ones(1,16)];subplot(3,1,1)stem(k1,f1);titl](/uploads/image/z/4511166-6-6.jpg?t=matlab%E6%96%B0%E6%89%8B%E6%B1%82%E5%A4%A7%E7%A5%9E%E5%B8%AE%E5%BF%99%21%25f1%3Af1%28k%29%E7%9A%84%E6%A0%B7%E5%80%BC%E5%90%91%E9%87%8F%25k1%3Af1%28K%29%E5%AF%B9%E5%BA%94%E7%9A%84%E6%97%B6%E9%97%B4%E5%90%91%E9%87%8F%25f2%3Af2%28k%29%E6%A0%B7%E5%80%BC%E5%90%91%E9%87%8F%25k2%3Af2%28k%29%E5%AF%B9%E5%BA%94%E6%97%B6%E9%97%B4%E5%90%91%E9%87%8F%25f3%3Af3%28k%29%E7%9A%84%E6%A0%B7%E5%80%BC%E5%90%91%E9%87%8F%25k3%3Af3%28K%29%E5%AF%B9%E5%BA%94%E7%9A%84%E6%97%B6%E9%97%B4%E5%90%91%E9%87%8Fk1%3D-5%3A15%3Bf1%3D%5Bzeros%281%2C5%29%2Cones%281%2C16%29%5D%3Bsubplot%283%2C1%2C1%29stem%28k1%2Cf1%29%3Btitl)
matlab新手求大神帮忙!%f1:f1(k)的样值向量%k1:f1(K)对应的时间向量%f2:f2(k)样值向量%k2:f2(k)对应时间向量%f3:f3(k)的样值向量%k3:f3(K)对应的时间向量k1=-5:15;f1=[zeros(1,5),ones(1,16)];subplot(3,1,1)stem(k1,f1);titl
matlab新手求大神帮忙!
%f1:f1(k)的样值向量
%k1:f1(K)对应的时间向量
%f2:f2(k)样值向量
%k2:f2(k)对应时间向量
%f3:f3(k)的样值向量
%k3:f3(K)对应的时间向量
k1=-5:15;
f1=[zeros(1,5),ones(1,16)];
subplot(3,1,1)
stem(k1,f1);title('f1(k)')
k2=k1;
f2=[zeros(1,5),ones(1,3),zeros(1,13)];
subplot(3,1,2)
stem(k2,f2);title('f2(k)')
k3=k1(1)+k2(1);k1(end)+k2(end);
f3=conv(f1,f2);
subplot(3,1,3)
stem(k3(),f3);title('f3(k)');
Error using ==> stem at 44
X must be same length as Y.
%f:f(k)的样值向量
%k:f(k)对应的时间向量
f1=[1 2 1];%输入样值序列及其特征
k1=[-1 0 1];
f2=ones(1,5);
k2=-2;2;
f=conv(f1,f2);
k0=k1(1)+k2(1);%序列f非零样值的起点
k3=length(f1)+length(f2)-2;
k=k0;k0+k3;
subplot(3,1,1);%f1(k)的波形
stem(k1,f1);title('f1(k)');
subplot(3,1,2);%f2(k)的波形
stem(k2,f2);title('f2(k)');
subplot(3,1,3);%f(k)的波形;
stem(k,f);title('f(k)');
Error using ==> stem at 44
X must be same length as Y.
这两个程序都出现了同样的问题请问要怎么改?
改一个就行
matlab新手求大神帮忙!%f1:f1(k)的样值向量%k1:f1(K)对应的时间向量%f2:f2(k)样值向量%k2:f2(k)对应时间向量%f3:f3(k)的样值向量%k3:f3(K)对应的时间向量k1=-5:15;f1=[zeros(1,5),ones(1,16)];subplot(3,1,1)stem(k1,f1);titl
k3=k1(1)+k2(1);k1(end)+k2(end);
这一行代码,出现了问题,k3的结果为-10,是一个数值,明显不符合你的意图!