problem with matlab bvp4c
5 views (last 30 days)
Show older comments
I have to find a trajectory in 3d space of a particle. The initial and final locations of a particle are given The initial velocity and acceleration are given There is gravitational force towards the closest point on some circle in space (the circle is passing through initial and final locations of the particle). There is also a force at every location of the particle acting in direction parallel to the direction of the tangent vector to the circle at the closest point on a circle to this location, also frequency farce. (The forces constants are the parameters to the problem) I solved the same problem with only initial conditions with ode45 got a good result and used the location after time Tf and the same initial and constant parameters with bvp4c The initial guess is the equation of the circle passing through initial and final locations .which derivative at the initial point gives the initial velocity of the particle.
Error using bvp4c (line 251) Unable to solve the collocation equations -- a singular Jacobian encountered.
I can't figure out where is my mistake My code is attached
3 Comments
Adam Barber
on 10 Aug 2015
Hi Yuri,
If you are having trouble with the "Singular Jacobian" error, this link may prove helpful:
This is a relatively general error and this article has good steps to take to try and solve the problem. It may not be an explicit mistake in your code, but rather that this is a difficult problem to solve.
Hope that helps,
-Adam
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!