Unable to understand the source of erroneous output

1 visualización (últimos 30 días)
Pranav Nag
Pranav Nag el 24 de Nov. de 2021
Comentada: Cris LaPierre el 29 de Dic. de 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 comentario
Cris LaPierre
Cris LaPierre el 29 de Dic. de 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);

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Assembly en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by