# DifferentialEquations with nested functions + Callbacks

**URL:** <https://discourse.julialang.org/t/differentialequations-with-nested-functions-callbacks/24737>\
**Category:** New to Julia\
**Created:** [May 29, 2019, 2:32pm UTC](https://discourse.julialang.org/t/differentialequations-with-nested-functions-callbacks/24737 "2019-05-29T14:32:24Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![HelgavonLichtenstein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgavonlichtenstein/32/5005_2.png) [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Post date:** [June 3, 2019, 12:25pm UTC](https://discourse.julialang.org/t/differentialequations-with-nested-functions-callbacks/24737/7 "2019-06-03T12:25:33Z")

</div>

I am trying to follow the examples [here](http://docs.juliadiffeq.org/latest/features/diffeq_arrays.html#Example:-A-Control-Problem-1) and [here](https://discourse.julialang.org/t/is-there-a-way-to-run-differential-equations-to-a-specific-point-and-then-change-input-values-continue-running-and-graph-it-together/19232/8) so I thought it was common to use `f1`.

Everything in the code is defined and works, except for `f1` which I now introduce as part of the callback. I will think about this some more and try to make my question more understandable.

---

_[View the full topic](https://discourse.julialang.org/t/differentialequations-with-nested-functions-callbacks/24737)._
