MATLAB: How we plot the the below function in MATLAB

plottingsolve

x₃[n]= (0.8)^n U[n] -10< n <10

Best Answer

See if this does what you want:
n = -19:20;
Un = [zeros(1,10) ones(1,20) zeros(1, 10)];
x3 = 0.8.^n .* Un;
figure(1)
stem(n, x3)
grid
Related Question