SHARE
TWEET

Untitled

a guest Mar 18th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. close all;
  2. clc;
  3. clear all;
  4.  
  5.  
  6. T=[15 10 5];
  7. tau=[40 20 10];
  8. load('pomiary_3out.mat');
  9. time=1:1:300;
  10. figure(1)
  11. plot(time,pomiary_3out);
  12.  
  13. y1=pomiary_3out(:,1)- pomiary_3out(1,1);
  14. y2=pomiary_3out(:,2)- pomiary_3out(1,2);
  15. y3=pomiary_3out(:,3)- pomiary_3out(1,3);
  16.  
  17. figure(2)
  18. plot(time,y1);
  19. figure(3)
  20. plot(time,y2);
  21. figure(4)
  22. plot(time,y3);
  23.  
  24. k1=(y1(300,1)-y1(1,1))/1.0
  25. k2=(y2(300,1)-y2(1,1))/1.0
  26. k3=(y3(300,1)-y3(1,1))/1.0
  27.  
  28. [ld1,md1]=pade(tau(1),10);
  29. [l1,m1]=series([k1],[T(1) 1],ld1,md1);
  30. ym1=step(l1,m1,time);
  31. MSE1=sum((y1-ym1).^2);
  32.  
  33. [ld2,md2]=pade(tau(2),10);
  34. [l2,m2]=series([k2],[T(2) 1],ld2,md2);
  35. ym2=step(l2,m2,time);
  36. MSE2=sum((y2-ym2).^2);
  37.  
  38. [ld3,md3]=pade(tau(1),10);
  39. [l3,m3]=series([k3],[T(1) 1],ld3,md3);
  40. ym3=step(l3,m3,time);
  41. MSE3=sum((y3-ym3).^2);
  42.  
  43. figure(5)
  44. plot(ym1);
  45. figure(6)
  46. plot(ym2);
  47. figure(7)
  48. plot(ym3);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top