Unable to understand the source of erroneous output
1 view (last 30 days)
I know this is a huge ask but it is for an assignment that's due soon and I am unable to figure out the source of the erroneous output iin my code.
I have built a predictive basketball trajectory model. The methodology is as follows-
- I first generate a 3D matrix (Sample_Space) which contains all the trajectories possible from the specified initital y posn (Height_Shooter)
- I then check for the minimum acceptable angle to prevent the shot from being blocked (AngleSelector)
- Thereafter I use the func PredictedValues to generate suitable launch angles and velocities for a successful 3pt shot
Where the error occurs:
One instance of the error is when Height_Shooter = 1.7, Height_Defender = 2.1, Separation = 0.3
I have attached a screenshot of the error. I don't know why the 2nd trajectory is working with 36 degrees when the min angle is 58 degrees
I suspect the error lies in PredictedValues and I have tried using a breakpoint and runniing through the entire loop but in vain.
I will be super grateful if you could help me fix this, thank you!