Does Matlab solver allow integration?

조회 수: 1 (최근 30일)
CD
CD 2021년 2월 5일
답변: Robert U 2021년 2월 5일
I know how to use the solver to solver an ode:
% L*diL/dt = -R*iL
syms iL(t) R L Vo
cond = iL(0) == Vo/R
ode = diff(iL,t) == -(R/L)*iL;
iLSol(t) = dsolve(ode, cond)
How does one do something similar for integration?
I do not want a single value but rather an equation:
This is the setup:
syms t L R Vo
WR = R*((Vo/R)*exp(-t/(L/R)))^2, ideally integrate from 0 to Inf.
I just do not understand the "symbolic integration" syntax (assuming that it exists).
Thank you.

채택된 답변

Robert U
Robert U 2021년 2월 5일
Hi Craig Dekker,
please, have a look at the documentation symbolic int():
syms t L R Vo
WR = R*((Vo/R)*exp(-t/(L/R)))^2
iWR = int(WR,t,0,inf);
In order to have an appealing result:
pretty(iWR)
Kind regards,
Robert

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Equation Solving에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by