how can plot such a signal s(-t-5)?
조회 수: 3 (최근 30일)
Abhiram Bhanuprakash 2015년 5월 20일
I think your approach is right, and it accounts for the Y axis values.
But, for the X axis indices, I think you should do something like this:
Say you have a signal s(n) = [1 2 3 4], and you wish to obtain s1(n) = s(-n-5):
s = [1 2 3 4];
inds = 0:length(s)-1;
figure, plot(inds,s); %considering time index 0 as the origin
s1 = fliplr([zeros(1,5) a]);
flippedInds = -(length(s1)-1):0;
For discrete signal plots, you can use the stem function instead of plot.
Hope this helps,