Unable to understand the source of erroneous output

1 Ansicht (letzte 30 Tage)
Pranav Nag
Pranav Nag am 24 Nov. 2021
Kommentiert: Cris LaPierre am 29 Dez. 2021
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-
  1. I first generate a 3D matrix (Sample_Space) which contains all the trajectories possible from the specified initital y posn (Height_Shooter)
  2. I then check for the minimum acceptable angle to prevent the shot from being blocked (AngleSelector)
  3. 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!
  1 Kommentar
Cris LaPierre
Cris LaPierre am 29 Dez. 2021
Tried to look into it, but got the following error
Unrecognized function or variable 'ballmodel_complex'.
Error in odearguments (line 92)
f0 = ode(t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ode45 (line 107)
odearguments(odeIsFuncHandle,odeTreatAsMFile, solver_name, ode, tspan, y0, options, varargin);
Error in Sample_Space (line 12)
[T,Z] = ode45(@ballmodel_complex, t, ic);

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by