Warning while solving 2 Simultaneous ODE's using dsolve
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Thinesh Kumar T M
el 24 de Sept. de 2021
Respondida: Shravan Kumar Vankaramoni
el 8 de Oct. de 2021
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/748104/image.png)
0 comentarios
Respuestas (1)
Shravan Kumar Vankaramoni
el 8 de Oct. de 2021
Hi,
Yes, you will get that warning if you try to pass equations and conditions directly to "dsolve". You need to use "diff" function to define a differential. You can do something as following for "d2y/dt2" with the initial conditions y(0)=b and y′(0)=1
syms y(t) a b
eqn = diff(y,t,2) == a^2*y;
Dy = diff(y,t);
cond = [y(0)==b, Dy(0)==1];
ySol(t) = dsolve(eqn,cond)
Similar to the condition, equation can also be a vector. Hope this helps
Refer to the below documentation for more information:
0 comentarios
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!