Advertisement
Adytzu04

IA

May 31st, 2013
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.69 KB | None | 0 0
  1. clc;
  2. clear;
  3. k=input('k=');
  4. num=[1 k];
  5. den1=[1 0 1 1 1];
  6. den2=[1 1 1 1];
  7. den3=[2 1 1];
  8. den4=[1 2 1];
  9. den5=[1 1 2];
  10. t=(0:0.1:50);
  11. h1=step(num,den1,t);
  12. hst=num(length(num)/den1(length(den1)));
  13.  
  14. h2=step(num,den2,t);
  15. hst=num(length(num)/den2(length(den2)));
  16.  
  17. h3=step(num,den3,t);
  18. hst=num(length(num)/den3(length(den3)));
  19.  
  20. h4=step(num,den4,t);
  21. hst=num(length(num)/den4(length(den4)));
  22.  
  23. h5=step(num,den5,t);
  24. hst=num(length(num)/den5(length(den5)));
  25.  
  26. subplot(4,1,1); plot(t,h1); xlabel('Timp'); ylabel('h1');
  27. subplot(4,1,2); plot(t,h2); xlabel('Timp'); ylabel('h2');
  28. subplot(4,1,3); plot(t,h3); xlabel('Timp'); ylabel('h3');
  29. subplot(4,1,4); plot(t,h4); xlabel('Timp'); ylabel('h4');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement