Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. clear all
  2. close all
  3. clc
  4.  
  5. %Tema2 A
  6. Fes=40000; %Frecventa esantionare
  7. load('sunet_a.mat')
  8. load('sunet_i.mat')
  9. load('sunet_s.mat')
  10. load('xilo.mat')
  11. size(ya)/Fes
  12. size(yi)/Fes
  13. size(ys)/Fes
  14. size(yx)/Fes
  15. %Tema2 B
  16. pulsatie=pi/3;
  17. Ts=1;
  18. M=12;
  19. t=0:Ts:M;
  20. xa=@(t) sin(pulsatie*t);
  21. xadiscret=zeros(1,length(t));
  22. for i=1:length(t)
  23. xadiscret(i)=xa(t(i));
  24. end
  25. %Tema2 C
  26. figure(1)
  27. hold on
  28. fplot(xa,[0,M])
  29. stem(t,xadiscret)
  30. hold off
  31.  
  32. %Tema3 A
  33. pulsatie=pi/15;
  34. Ts=1;
  35. M=30;
  36. t=0:Ts:M;
  37. xa=@(t) sin(pulsatie*t);
  38. xadiscret=zeros(1,length(t));
  39. for i=1:length(t)
  40. xadiscret(i)=xa(t(i));
  41. end
  42. figure(2)
  43. hold on
  44. fplot(xa,[0,M])
  45. stem(t,xadiscret)
  46. hold off
  47.  
  48. %Tema3 B
  49. pulsatie=3*pi/15;
  50. Ts=1;
  51. M=10;
  52. t=0:Ts:M;
  53. xa=@(t) sin(pulsatie*t);
  54. xadiscret=zeros(1,length(t));
  55. for i=1:length(t)
  56. xadiscret(i)=xa(t(i));
  57. end
  58. figure(3)
  59. hold on
  60. fplot(xa,[0,M])
  61. stem(t,xadiscret)
  62. hold off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement