Solving complex coupled differential equations numerically with initial condition
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Star Strider
el 30 de Oct. de 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 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!