Solving complex coupled differential equations numerically with initial condition

3 ビュー (過去 30 日間)
Leeseok Kim
Leeseok Kim 2021 年 10 月 30 日
回答済み: Star Strider 2021 年 10 月 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 Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by