How can I make a repeating rectangular wave with a specified period?
7 次查看(过去 30 天)
显示 更早的评论
Hello, this is my first post so I am hoping that my formating is okay. I need to plot a descrete rectangular wave 7 units wide and that repeats with a period of 35 units. I know how to make the intial signal using the rectangularPulse function but I am not sure how to go about repeat it with the desired period. I need to show a minimum of 4 full cycles. Any help would be greatly appreciated.
n = -20:20;
y = rectangularPulse(-3.5,3.5,n);
stem(n,y);
0 个评论
回答(1 个)
KSSV
2019-3-11
n = -20:20;
y = rectangularPulse(-3.5,3.5,n);
y1 = repmat(y,1,4) ;
n1 = 1:length(y1) ;
stem(n1,y1);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!