draw othorgonal trajectories using differential equations
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Brenda Galabe
el 12 de Dic. de 2018
Comentada: madhan ravi
el 13 de Dic. de 2018
to draw orthogonal trajectories am i suppose to use dfield or is ezplot as shown below on the right track
Using the Matlab draw the families of orthogonal trajectories for the following differential equation 1) dy /dx = a*x*y /(b*x^2−c*y^2 )
2) dy/ dx = −d*x /e*y
syms y(x) x y
ode = diff(y,x) == (a*x*y)/(b*x^2-c*y^2);
ysol(x) = dsolve(ode)
ezplot(y(x))
error coming up
0 comentarios
Respuesta aceptada
madhan ravi
el 12 de Dic. de 2018
Not more than two variables have to be symbolic so a,b,c valyes are assigned:
syms y(x)
a=2;
b=3;
c=5;
ode = diff(y,x) == (a*x*y)/(b*x^2-c*y^2);
ysol = vpa(dsolve(ode));
ezplot(ysol(1))
hold on
ezplot(ysol(2))
ezplot(ysol(3))
Más respuestas (1)
Brenda Galabe
el 12 de Dic. de 2018
5 comentarios
Brenda Galabe
el 13 de Dic. de 2018
Editada: madhan ravi
el 13 de Dic. de 2018
madhan ravi
el 13 de Dic. de 2018
syms y(x) C5 %C5 arises in ysol change it to your constant whether C2 or etc.. doesn't matter
d= 5;
e = 8;
dydx=diff(y);
ode = dydx == (-d*x)/(e*y);
ysol = vpa(dsolve(ode));
y1=subs(ysol,C5,4);
fplot({y1(1),y1(2)})
Ver también
Categorías
Más información sobre Symbolic Math Toolbox 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!