Advertisement
Sourav_CSE

SS Lab Class No 08

Nov 13th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. %{
  2. Signal System lab Class No - 08
  3. Minhaj Rahat Sir
  4. Date : 13 November,2019 , Wednesday
  5. Time : 10.30 PM - 12.30 PM
  6.  
  7. %}
  8.  
  9. % Fourier Coefficient for function y(t)= e(-t)
  10. %% Experiment 1
  11. clc;
  12. clear all;
  13. close all;
  14. syms t k % considering t and k as symbolic part
  15. y = exp(-t);
  16. T = 3;
  17. w = 2*pi/T;
  18. an = (1/T)*int(y*exp(-j*k*w*t),t,0,T);
  19.  
  20. k1 = -10:10;
  21. ann = subs(an,k,k1);
  22. stem(k1,abs(ann),'g');
  23. xlabel('Plot of |x[k]|');
  24. figure
  25. stem(k1,angle(ann));
  26. xlabel('Plot the angle of |x[k]|');
  27. %% Experiment 2
  28. xn = sum(ann.*exp(j*k1*w*t);
  29. figure
  30. ezplot(xn,[0 10]);
  31. %% Experiment 3
  32. % Fourier Representation
  33. syms t
  34. x = heaviside(t)-2*heaviside(t-1);
  35. T =2;
  36. w = 2*pi/T;
  37. k = -10:10;
  38. a = (1/T)*int(x*exp(-j*k*w*t),t,0,2);
  39. sign = sum(a.*exp(j*k*w*t));
  40. ezplot(sign,[0 10])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement