HTML

HOWAR_EGN1007_CH10.m

Jan 22nd, 2019
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.60 KB | None | 0 0
  1. format short
  2.  
  3. %% Problem 3
  4.  
  5. Po = 100;
  6. r = 0.9;
  7. t = 10;
  8. P = Po * exp(r * t)
  9.  
  10. %% Problem 10
  11.  
  12. rad = 0:0.1 * pi:2 * pi;
  13. sine = sin(rad);
  14. cosine = cos(rad);
  15. chart = [rad' , sine' , cosine']
  16.  
  17. %% Problem 11
  18.  
  19. A = 4;
  20. w = 0.6;
  21. t = 0:0.1:10;
  22. x = A * cos(w * t);
  23. chart = [t' , x']
  24.  
  25. %% Problem 16
  26.  
  27. theta = 0:0.01 * pi:0.5 * pi;
  28. g = 9.81;
  29. vo = 100;
  30. range = (vo^2 / g) * sin(2 * theta);
  31. chart = [theta' , range']
  32.  
  33. %% Problem 17
  34.  
  35. G = [68 83 61 70 75 82 57 5 76 85 62 71 96 78 76 68 72 75 83 93]
  36. avg = mean(G);
  37. med = median(G);
  38. mod = mode(G);
  39. chart = [sort(G, 'ascend')']
  40. amt = length(G)
Advertisement