Error using griddedInterpolant. The grid vectors are not strictly monotonic increasing.
Show older comments
I am trying to solve a System of differential equations for a torsional pendulum with euler forward finite difference method. (lines 37 to 51) After every step I need to find an specific value of time (tn) by interpolation with the angular position y(1,:) and the time t (lines 59 to 65). It keeps saying that the values are not strictly monotonic increasing but I am making sure they are by setting a constraint that angular speed y(2,:) is never negative or equal to zero. (lines 53 to 57)
If I run the code for a very small time It works but if I want to do it for a longer time it keeps giving me that error. Is there anything I can do?
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!