Unable to understand the source of erroneous output

조회 수: 1 (최근 30일)
Pranav Nag
Pranav Nag 2021년 11월 24일
댓글: Cris LaPierre 2021년 12월 29일
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
Cris LaPierre
Cris LaPierre 2021년 12월 29일
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);

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by