How can I solve an ODE without using nested functions?

前端 未结 2 738
借酒劲吻你
借酒劲吻你 2021-01-21 07:06

I have some differential equations that I need to solve using MATLAB\'s ODE solvers. While the differential equations themselves are fairly simple, they depend on a lot of \"con

2条回答
  •  滥情空心
    2021-01-21 07:57

    I don't see how your code, as written, can work since no one ever calls or points to someFunctionStep. Should that be the first input to ode15s?

    In any case, you can write a separate someFunctionStep function that takes varargin or inputs. And then create an anonymous function with the constants. Pass that into ode15s.

    --Loren

提交回复
热议问题