how do plot x(n)=u(n-2)-u(n-5)
109 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Maik
2022-11-5
n = (-20:20);
u_n = n>=0;
u_n_2 = n>=2;
u_n_5 = n>=5;
u_diff = u_n_2 - u_n_5;
subplot(3,1,1); stem(n,u_n_2);xlim([-15 15]); ylim([-2 2])
subplot(3,1,2); stem(n,u_n_5);xlim([-15 15]); ylim([-2 2])
subplot(3,1,3); stem(n,u_diff);xlim([-15 15]); ylim([-2 2])
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!