How do I solve this differential equation with MATLAB?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi yall!
I'm wondering how to get the solution for "dy/dx = x^2 - 1" in MATLAB using dsolve with initial condition y(0) = 1. I want to know and see all the MATLAB work for when x = 1 and when x = 2. I'm familiar with dsolve but I want to see how to use it correctly. Please help me.
0 comentarios
Respuestas (1)
Walter Roberson
el 3 de Oct. de 2019
Editada: Walter Roberson
el 3 de Oct. de 2019
syms y(x)
dy = diff(y(x),x);
eqn = dy == Some Function Of x and y
sol = dsolve(eqn, y(0) == Initial Condition)
subs(sol, x, Some Value)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!