Advertisement
Guest User

Pee computation

a guest
Nov 11th, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.42 KB | None | 0 0
  1. r=0.004;
  2. m = (4*pi*r^3 / 3 * 1000);
  3. A=pi*r^2;
  4. cd=0.5;
  5. rhoair=1.29;
  6. a = 1/2*rhoair*cd*A/m;
  7. b=9.81;
  8.  
  9. t=0:0.01:5;
  10.  
  11. y=sqrt(b/a)*tanh(sqrt(a*b)*t);
  12. p=cumtrapz(t,y);
  13.  
  14. ax=plotyy(t,y,t,p);
  15. hold on
  16. plot(t, sqrt(b/a)*ones(1, numel(t)), 'r:')
  17. hold off
  18. xlabel('time')
  19. legend('velocity [m/s]', 'terminal velocity', 'distance [m]', 'Location', 'SouthEast');
  20. ylabel(ax(1), 'velocity [m/s]');
  21. ylabel(ax(2), 'distance [m]');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement