how to solve this equation in matlab? Please help
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
please help me for solving this equation in matlab , thank you all , see the attached file.
0 commentaires
Réponse acceptée
Torsten
le 23 Fév 2016
Use MATLAB's bvp4c to solve
y1' = y2
y2' = a*sin(y1)*cos(y1)
(a=V^2/V_th^2*Pi^2/L^2)
with boundary conditions
y1(0.01)=Pi/2
y1(L)=Pi/2
Best wishes
Torsten.
5 commentaires
Torsten
le 25 Fév 2016
To plot, add
x = linspace(0,L,20);
y = deval(sol,x);
plot(x,y(1,:));
after the line
sol=bvp4c(@(x,y)ode(x,y,a),@bc,solinit);
Best wishes
Torsten.
Voir également
Catégories
En savoir plus sur PDE Solvers dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!