Solving an integro-differential equation

Hello, I'm trying to solve the following differential equation that also has an integral.
I am trying to solve for L (output) with initial conditions of h0=0 and h'=0. The h is with respect to time. r, U and B are constants. The integral part of the equation is equated to A for Matlab coding. So far I have:
syms B h(t) L r U h0 Y
A = @(t,U,B) integral(@(t) exp((-U*t/B)*0.1843)*h, 0, t);
Eqn = diff(h) == (L/((-1.8775)*U*r*B))+(-0.1654)*U*h/B-...
((0.0466*U^2)/(B^2))*A(t,U,B);
hsol = dsolve(Eqn, h(0)==h0);
Lsol = solve(hsol,L);
Lsol = simplify(Lsol, 'Steps',500);
Lfcn = matlabFunction(Lsol);
Eqn normally works if I have A as constant. However, when I have it as the definite integral, Matlab wants me to have h as an input argument. How can I have Lfcn as having only r, U, B, h0, t as inpute arguments? Thank you.

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

产品

版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by