Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.48 KB | None | 0 0
  1.  
  2. %%Time specifications:
  3. Fs = 8000;                   % samples per second
  4. dt = 1/Fs;                   % seconds per sample
  5. StopTime = 10;             % seconds
  6. t = (0:dt:StopTime-dt)';     % seconds
  7.  
  8. %Zad1
  9. omega = 5;
  10.  
  11. %K(j5)
  12. KJ5 = (3/(65*i +15))
  13. A = abs(KJ5)
  14. fi = angle(KJ5)
  15. K = tf(3, [1 13 40])
  16. u = sin(omega * t);
  17. figure(1)
  18. nyquist(K)
  19.  
  20. Y1=A*sin(omega*t + fi)
  21. [Y2, Tsim, X] = lsim(K,u,t);  % simulate
  22. figure(2)
  23.  
  24. hold on
  25. plot(t,Y1, 'b')
  26. hold on
  27. plot(Tsim, Y2, 'r')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement