Please answer all the questions Here is evenodd function: function [xe, xo, m] = evenodd(x,n) % Real signal decomposition into even and odd parts % ------------------------------------------------- % [xe, xo, m] = evenodd(x,n) % if any(imag(x) ~= 0) error('x is not a real sequence') end m = -fliplr(n); m1 = min([m,n]); m2 = max([m,n]); m = m1:m2; nm = n(1)-m(1); n1 = 1:length(n); x1 = zeros(1,length(m)); x1(n1+nm) = x; x = x1; xe = 0.5*(x + fliplr(x)); xo = 0.5*(x - fliplr(x)); Problem 2: a. Show that any signal can be decomposed into it an even and an odd component. Is the decomposition unique? b. Using the evenodd function, decompose the following sequences into their even and odd components Plot the original sequence and its components on one figure using subplot commands. ·n(n)-cos(0.2πn + π/4), -20 n-20 · T2(n) = e-0.05n sin(0.1πn + π/3), 0 n-100 Problem 2: a. Show that any signal can be decomposed into it an even and an odd component. Is the decomposition unique? b. Using the evenodd function, decompose the following sequences into their even and odd components Plot the original sequence and its components on one figure using subplot commands. ·n(n)-cos(0.2πn + π/4), -20 n-20 · T2(n) = e-0.05n sin(0.1πn + π/3), 0 n-100
-
Engineering 2022-05-15 19:04:59