Solving an integro-differential equation

3 vues (au cours des 30 derniers jours)
Saruultugs Batzorig
Saruultugs Batzorig le 24 Oct 2019
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.

Réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by