资源描述
1.>> n=[2:1:10];
>> x=n;
>> stem(n,x,'filled');
>> xlabel('n');
>> ylabel('x(n)');
>> title('Ramp Sequence');
>> grid;
2. >> n=0:40;
>> subplot(2,1,1);
>> stem(n,cos(n*pi/8),'filled');
>> title('cos(n*pi/8)');
>> subplot(2,1,2);
>> stem(n,cos(2*n),'filled');
>> title('cos(2*n)');
3.
>> n=0:15;
>> subplot(2,1,1);
>> x=(5/4).^n;
>> stem(n,x,'filled');xlabel('n');title('x1(n)')
>> subplot(2,1,2)
>> x=(-3/4).^n;
>> stem(n,x,'filled');xlabel('n');title('x2(n)')
>>
4. h=[1 1 1];
y=conv(x,h);
subplot(1,3,1);
stem(0:length(x)-1,x,'filled');title('x(n)');xlabel('n');
>> subplot(1,3,2);
>> stem(0:length(h)-1,h,'filled');title('h(n)');xlabel('n');
>> subplot(1,3,2);
stem(0:length(h)-1,h,'filled');title('h(n)');xlabel('n');
>> subplot(1,3,3);
>> stem(0:length(y)-1,y,'filled');title('x(n)与h(n)的卷积和y(n)');xlabel('n');
>>
5. >> a=[2 -2 1];
>> b=[1 3 2];
>> n=30
n =
30
>> impz(b,a,n);
>>
展开阅读全文