Please explain how to solve coupled equation in MATLAB? ODE 45 or Runge kutta method? The equation is d/dz(Ep) + (n/c) d/dt (Ep) = Es M where n= 1.45 and C = 3e8

2 vues (au cours des 30 derniers jours)
%Non Linear ODE equation
clc;
clear all;
%code is incomplete, i was trying to explore but couldnt figure it out properly
c=3e8;
A= 86;
n= 1.45;
g= 1.92e-11;
i= 1;
M= i.* g .* A ;
V= n/ c;
syms z t;
f = @(z,t) ;

Réponses (1)

Torsten
Torsten le 2 Sep 2022
Modifié(e) : Torsten le 2 Sep 2022
The equation you posted is a PDE, not an ODE. So an ODE integrator cannot be used directly for its solution.
You will have to discretize the equation in the z-coordinate and solve the resulting system of ordinary differential equations using ODE15S. Look up "method-of-lines" and "upwind scheme" for more information.
If all variables except E_p and your boundary condition at z=0 are constant, the equation can be solved analytically.

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by