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