pulse shape.sce 680 B

123456789101112131415161718192021222324252627282930
  1. xdel(winsid())
  2. clear;
  3. t = [0:0.01:10];
  4. a = 0.5;
  5. b = 0.6;
  6. k = 1;
  7. y = k*(exp(-a*t) - exp(-b*t) );
  8. ymax = max(y)*ones(1,length(y));
  9. xpts = [1 1];
  10. ypts = [0 max(y)];
  11. plot(xpts*0.07, ypts, '--');
  12. plot(xpts*1.1, ypts, '--');
  13. plot(xpts*8.96, ypts, '--');
  14. plot(t,y, 'black');
  15. plot(t,ymax.*0.1, '--');
  16. plot(t,ymax.*0.9, '--');
  17. // titletxt = ['$y = k(e^{-\alpha t} - e^{-\beta t})$' ; strcat(['$k=', string(k), ', \alpha=', string(a), ', \beta=', string(b), '$']) ];
  18. titletxt = '$u(t) = k(e^{-\alpha t} - e^{-\beta t})$';
  19. title(titletxt , 'fontsize', 8);
  20. xlabel('t (s)', 'fontsize', 7);
  21. ylabel('U (V)', 'fontsize', 7, 'rotation', 0);
  22. a = get("current_axes");
  23. a.axes_visible = "off";