How to convey time variant variables to DAE solvers (ode15s, etc - symbolic approach)?

1 次查看(过去 30 天)
Consider large set of DAE equations. Each equation depends on state variable such as x(t), y(t), etc. These variables are known within their domain, but they do change in time. In documentation there is a step 4: Convert DAE Systems to MATLAB Function Handles that explains how to supply numerical values to constant variables, however there is no mention about time dependant ones.
I know that one can call solver with function handle to custom function that has independent variable within its argument, i.e.
[T, solution] = ode15s(@odefun, [t0, tf], initial_y);
function Y = odefun(t,y)
% t is independent variable. Now we can count x(t), such as
x = getx(t);
(...)
end
However I don't know how to connect such syntax with symbolic toolbox approach from step 6:
ode15s(F, [t0, tf], y0, opt)
where F and M (hidden inside opt) are constant function handles (obtained in step 4), whereas should be time dependent like in code above.
Regards, Paul.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by