Solving complex coupled differential equations numerically with initial condition

조회 수: 3 (최근 30일)
Hi, I'm pretty new to Matlab, and I'd like to solve such coupled complex differential equations, where variable is s, and A, T, w, and Δ are constants. Since this doens't have analytical solutions, I want to solve numerically with some fixed values for the constants and the initial condition, e.g. a(s=0) = 1 and b(s=0) = 0. I'd really appreaciate it if anyone can help me setting the Matlab codes up for this.

답변 (1개)

Star Strider
Star Strider 2021년 10월 30일
Start with the Symbolic Math Toolbox ...
syms A a(t) b(t) delta omega s T
eqn1 = diff(a) == 1i*T/2 * (A*cos(omega*T*s)*a + delta*b)
eqn1(t) = 
eqn2 = diff(b) == 1i*T/2 * (delta*a - A*cos(omega*T*s)*b)
eqn2(t) = 
Then, use the odeToVectorField and the matlabFunction functions to produce an anonymous function that the numerical differential equation solvers can use. It may be necessary to experiment with it after reading the documentation on those functions thoroughly to understand how to use them and what they do.
.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by