ball_math.m 238 B

1234567891011
  1. clear all;clc;close all;
  2. addpath('functions');
  3. p.height_initial = 1.8;
  4. p.height_final = 3;
  5. p.displacement = 7;
  6. p.theta_0 = 45;
  7. [p.theta_0, p.velocity] = fminbnd(@(x) speed_for_angle(p, x), 0, 90);
  8. p = calc_limits(p);
  9. animate_ball(p);