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!