Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. pkg load symbolic
  2.  
  3. n = 0:1:127 % sets the limits of the functions
  4.  
  5. % define functions
  6. x= (3*sin(n*pi/8)+3).*(heaviside(n) - heaviside(n-63))
  7. z= 7*cos(n*pi/16).*cos(n*pi).*(heaviside(n) - heaviside(n-63))
  8. w=x+z
  9. h=(1/2)*sinc(0.5*(n-31)).*(heaviside(n) - heaviside(n-63))
  10.  
  11. y=conv(x,h,'same')
  12.  
  13.  
  14.  
  15. % plot the functions
  16. figure
  17. plot (n,x)
  18.  
  19. figure
  20. plot (n,z)
  21.  
  22. figure
  23. plot (n,w)
  24.  
  25. figure
  26. plot (n,h)
  27.  
  28. figure
  29. plot (n,y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement