Nitin400

Question-Function for Folding:

Jan 2nd, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. function [y,n] = sigfold(x,n)
  2. % implements y[n] = x[−n]
  3. % y = folded sequence over n
  4. % x = input sequence over n
  5. n = -1:2
  6. x = [2 5 6 8]
  7. [z,v] = flipsig(x,n)
  8. zz = conv(z,x)
  9. function [y,ny] = flipsig(s1, ns)
  10. y = fliplr(s1)
  11. ny = fliplr(-ns)
  12. end
Add Comment
Please, Sign In to add comment