Facebook
From Sludgy Porcupine, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 201
  1. %a.)G(s)=k
  2. K=2;
  3. L=K;
  4. M=1; figure(1);
  5. subplot(2,2,1); step(L,M);
  6. subplot(2,2,2);impulse(L,M);
  7. subplot(2,2,3);nyquist(L,M);
  8. subplot(2,2,4); bode(L,M);
  9.  
  10. %b.)G(s)=k/s
  11. K=3;
  12. L=K;
  13. M=[1,0]; figure(2);
  14. subplot(2,2,1); step(L,M);
  15. subplot(2,2,2);impulse(L,M);
  16. subplot(2,2,3);nyquist(L,M);
  17. subplot(2,2,4); bode(L,M);
  18. %c.)G(s)=Ts
  19. T=5;
  20. L=[T,0];
  21. M=1; figure(3);
  22. %subplot(2,2,1); step(L,M);
  23. %subplot(2,2,2);impulse(L,M);
  24. subplot(2,2,3);nyquist(L,M);
  25. subplot(2,2,4); bode(L,M);
  26. %d.)G(s)=T2s/T1s+1
  27. T1=0.1;
  28. T2=8;
  29. L=[T2 0]
  30. M=[T1 1]; figure(4);
  31. subplot(2,2,1); step(L,M);
  32. subplot(2,2,2);impulse(L,M);
  33. subplot(2,2,3);nyquist(L,M);
  34. subplot(2,2,4); bode(L,M);
  35. %e.)G(s)=k/Ts+1
  36. k=3
  37. T=1;
  38. L=k
  39. M=[T 1]; figure(5);
  40. subplot(2,2,1); step(L,M);
  41. subplot(2,2,2);impulse(L,M);
  42. subplot(2,2,3);nyquist(L,M);
  43. subplot(2,2,4); bode(L,M);
  44. %f.)G(s)=K/(T1s+1)(T2S+1)
  45. T1=2;
  46. T2=4;
  47. K=2;
  48. L=K
  49. M=[T1*T2 T1+T2 1]; figure(6);
  50. subplot(2,2,1); step(L,M);
  51. subplot(2,2,2);impulse(L,M);
  52. subplot(2,2,3);nyquist(L,M);
  53. subplot(2,2,4); bode(L,M);
  54. %d.)G(s)=T2s/T1s+1
  55. T1=0.1;
  56. T2=8;
  57. L=[T2 0]
  58. M=[T1 1]; figure(7);
  59. subplot(2,2,1); step(L,M);
  60. subplot(2,2,2);impulse(L,M);
  61. subplot(2,2,3);nyquist(L,M);
  62. subplot(2,2,4); bode(L,M);
  63. %g.)G(s)=....
  64. K=1;
  65. w=1;
  66. f=0.5;
  67. L=K*w^2;
  68. M=[1 2*f*w w^2.71]; figure(8);
  69. subplot(2,2,1); step(L,M);
  70. subplot(2,2,2);impulse(L,M);
  71. subplot(2,2,3);nyquist(L,M);
  72. subplot(2,2,4); bode(L,M);
  73. %h.)G(s)=......
  74. K=1;
  75. w=1;
  76. f=0.2;
  77. L=K*w^2
  78. M=[1 2*f*w w^2.71]; figure(9);
  79. subplot(2,2,1); step(L,M);
  80. subplot(2,2,2);impulse(L,M);
  81. subplot(2,2,3);nyquist(L,M);
  82. subplot(2,2,4); bode(L,M);