problem2_projectilemotion.m 343 B

123456789101112131415
  1. addpath("functions")
  2. % Initial values
  3. v0 = 50; % m/s
  4. theta = 45; % degrees
  5. b = 0.8; %kg/s
  6. m = 1.0; %kg
  7. time = 0:0.05:5;
  8. [x_path, y_path] = projectile_drag(v0, theta, b, m, time);
  9. plot(x_path, y_path, "Color", "red", "LineWidth", 1.5);
  10. title("Projectile Motion with Air Drag");
  11. xlabel("x(m)");
  12. ylabel("y(m)");
  13. xlim([x_path(1), x_path(end)]);