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.

0 件のコメント
回答 (1 件)
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)
eqn2 = diff(b) == 1i*T/2 * (delta*a - A*cos(omega*T*s)*b)
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.
.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!