Matlab画冲激信号,stem方法,同一个窗口画多个坐标系,0.8^n*[u(n) | 您所在的位置:网站首页 › matlab里面stem › Matlab画冲激信号,stem方法,同一个窗口画多个坐标系,0.8^n*[u(n) |
Matlab画冲激信号,stem方法,同一个窗口画多个坐标系,
0.
8
n
∗
[
u
(
n
)
−
u
(
n
−
10
)
]
0.8^n*[u(n)-u(n-10)]
0.8n∗[u(n)−u(n−10)]式子的正确画法
信号与系统第二章matlab作业
2.1 离散卷积
MATLAB提供了conv函数可用来计算下面的卷积和 这里假设 和 都是有限长序列。如果 仅在 区间内为非零, 仅在 区间内为非零,那么 就仅在区间内为零值。conv函数具体用法如下: C = conv(A, B) 计算序列A、B的卷积,C为卷积向量,其长度为length(A)+length(B)-1。 x ( n ) = u ( n ) − u ( n ) , h ( n ) = 0. 8 n ∗ [ u ( n ) − u ( n − 10 ) ] x(n)=u(n)-u(n)\space \space \space , \space \space h(n)=0.8^n*[u(n)-u(n-10)] x(n)=u(n)−u(n) , h(n)=0.8n∗[u(n)−u(n−10)] matlab 命令行窗口 nx=0:3; x=ones(1,length(nx)); nh=0:9; h=exp(nh*log(0.8)); y=conv(x,h); ny_min=min(nx)+min(nh); ny_max=max(nx)+max(nh); ny=ny_min:ny_max; subplot(3,1,1);stem(nx,x); xlabel('n');ylabel('x(n)');axis([ny_min,ny_max,0,max(x)]); subplot(3,1,2);stem(nh,h); xlabel('n');ylabel('h(n)');axis([ny_min,ny_max,0,max(h)]); subplot(3,1,3);stem(ny,y); xlabel('n');ylabel('x(n)*h(n)');axis([ny_min,ny_max,0,max(y)]);
|
CopyRight 2018-2019 实验室设备网 版权所有 |