Is their the way we could put constraints for variables in ODE15s such that simulated values of these variables are always greater than 0.
Mostrar comentarios más antiguos
Some Values computed at different time through Ode15s solver are coming negative which ideally should not come. I just want to put constraints on these variables so that i could just get the positive values. Please let me know how can I put this constraint in ODE15s solver
Respuestas (1)
Sean de Wolski
el 15 de Oct. de 2014
Editada: Sean de Wolski
el 15 de Oct. de 2014
0 votos
It sounds like you need to add this to your odefun that ode15s is calling. If that values cannot be negative, then this function should not be returning negative values.
Actually, it looks like there is a 'NonNegative' option in odeset
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!