Advertisement
Guest User

Untitled

a guest
May 30th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. Gp = tf(0.4,[2.4 10.24 11 1]);
  2. [y,t] = step(Gp);
  3. ypp = diff(y,2);
  4. t_infl = fzero(@(T) interp1(t(2:end-1),ypp,T,'linear','extrap'),0);
  5. y_infl = interp1(t,y,t_infl,'linear');
  6.  
  7. plot(t,y)
  8. %axis([0 60 -1 1.5 ])
  9. grid
  10. hold on
  11. plot(t_infl,y_infl,'ro')
  12. A = [1.0597,1.2716];
  13. B = [0.0899,0.1168];
  14. plot(A,B,'*')
  15.  
  16. xlim = get(gca,'XLim');
  17. m = (B(2)-B(1))/(A(2)-A(1));
  18. n = B(1)*m-0.0560;
  19. y1 = m*xlim(1) + n;
  20. y2 = m*xlim(2) + n;
  21. line([xlim(1) xlim(2)],[y1 y2],'color','red')
  22. hold off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement