Solving complex coupled differential equations numerically with initial condition
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Star Strider
il 30 Ott 2021
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 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!