unit step function to mimic signal
조회 수: 4 (최근 30일)
이전 댓글 표시
Im having issues creating my unit step to look like the signal i have it just needs a small sshift that i do not know how to do.

x = square(t-1);
y = -2*square(t-1);
unitstep = zeros(size(t));
unitstep(t>=1)=-1;
댓글 수: 0
답변 (1개)
Agnish Dutta
2019년 4월 8일
From what I understand, you want the falling edge of your unit step signal to coincide with that of the square wave.
If that is the case then the following fix should work:
unitstep(t>=3)=-1 % Instead of "unitstep(t>=1)=-1;".
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!