moonnightingale
Full Member level 6
this is condition after inverse Z transform
I want to plot it
y[n]= u[n-1]-u[n-2]-u[n-3]+u[n-4]
I want to plot it
y[n]= u[n-1]-u[n-2]-u[n-3]+u[n-4]
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
this is condition after inverse Z transform
I want to plot it
y[n]= u[n-1]-u[n-2]-u[n-3]+u[n-4]
function y=ustep(x)
Y=zeros(size(x));
Y(x>=0)=1;
y=Y
t=-10:1:10;
plot(t,t.*ustep(t)-(t-2).*ustep(t-2)-(t-3).*ustep(t-3)+(t-5).*ustep(t-5))
grid on
xlabel('t')
ylabel('x(t)')
n=-10:1:10;
stem(n,n.*ustep(n)-(n-2).*ustep(n-2)-(n-3).*ustep(n-3)+(n-5).*ustep(n-5))
grid on
xlabel('n')
ylabel('x(n)')
@ Blooz:
Why do you multply each shifted step by the functions (t-...) or (n-...)?
That gives ramps.
Regards
Z
n=-10:1:10;
stem(n,ustep(n-1)-ustep(n-2)-ustep(n-3)+ustep(n-4))
grid on
xlabel('n')
ylabel('x(n)')