Advertisement
vinay586

Function for Even and Odd Decomposition of real signal

Oct 16th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.19 KB | None | 0 0
  1. n = -1:2
  2. x = [2 5 6 8]
  3. [xe,xo] = sigfold(x)
  4. subplot(2,1,1)
  5. stem(n,xe)
  6. subplot(2,1,2)
  7. stem(n,xo)
  8.  
  9.  
  10. function [xe,xo] = sigfold(x)
  11. xf = fliplr(x)
  12. xe = 1/2*(x + xf)
  13. xo = 1/2*(x - xf)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement