Rowan-Classes/8th-Semester-Spring-2025/clinic-consultant/labs/lab-3/lab3q5.m
2025-03-29 23:46:27 -04:00

21 lines
333 B
Matlab

% First 100 samples
for n=0:99
y1(n+1) = (1 - (0.95)^(n+1))/0.05;
y2(n+1) = n + 1;
end
% Plot output of system for input x[n] = 0.95^n u[n]
figure(1)
n=0:1:99;
stem(n,y1)
xlabel('n')
ylabel('y(n)')
% Plot output of system for input x[n] = u[n]
figure(2)
n=0:1:99;
stem(n,y2)
xlabel('n')
ylabel('y(n)')