Advertisement
vinay586

Function for folding

Oct 16th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.17 KB | None | 0 0
  1. n = -1:2
  2. x = [2 5 6 8]
  3. [z,v] = flipsig(x,n)
  4. subplot(2,1,1)
  5. stem(n,x)
  6. subplot(2,1,2)
  7. stem(v,z)
  8.  
  9.  
  10. function [y,ny] = flipsig(s1, ns)
  11.  
  12. y = fliplr(s1)
  13. ny = fliplr(-ns)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement