how to plot solution of differential second order equation ?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zina Odfl
el 17 de Sept. de 2017
Comentada: Zina Odfl
el 24 de Sept. de 2017
i would like to plot "sol3" but i still have this matlab error :
"Error using plot
Conversion to double from sym is not possible."
eq=diff(y,t)/R+C*diff(y,t,2)+y/L==diff(i,t)
Dy = diff(y,t);
cond = [y(0)==0, Dy(0)==0];
sol=dsolve(eq,cond)
sol2=simplify(sol)
sol3=vpa(sol2,2)
T=0:0.001:4;
plot(T, sol3);
1 comentario
Walter Roberson
el 17 de Sept. de 2017
You are trying to solve for two functions, y(t) and i(t), with only one equation, and without any boundary conditions for i(t) . The only way this could work is if i is a pre-defined equation that does not involve partial derivatives of i .
We would have an easier time reproducing your problem if you had given the syms calls and the values for R, C, and L.
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Calculus 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!