The document defines impulse and step signals with and without delays. It then computes the difference between the original and delayed signals. It applies discrete differentiation and integration to the difference signals and plots the original, derivative, and integral signals. The purpose is to examine how discrete differentiation and integration operators work on signals with delays.
The document defines impulse and step signals with and without delays. It then computes the difference between the original and delayed signals. It applies discrete differentiation and integration to the difference signals and plots the original, derivative, and integral signals. The purpose is to examine how discrete differentiation and integration operators work on signals with delays.
% Plot the signals and their derivatives/integrals
% The y variables of stem(x,y) in these cases are one element less than x % variable, thus I adjust the length of n accordingly figure(1); subplot(3,1,1); stem(n(1:length(diff_impulse_n)), diff_impulse_n); title('Impulse Function[n] - Impulse Function[n-5]', 'FontSize', 16); xlabel('n', 'FontSize', 14); ylabel('Amplitude', 'FontSize', 14);
% Plot the signals and their derivatives/integrals
% The y variables of stem(x,y) in these cases are one element less than x % variable, thus I adjust the length of n accordingly figure(2); subplot(3,1,1); stem(n(1:length(diff_step_n)), diff_step_n); title('Step Function[n] - Step Function[n-11]', 'FontSize', 16); xlabel('n', 'FontSize', 14); 25/2/23 3:04 PM test.m 2 of 2