How to simply differentiate equations?

4 visualizaciones (últimos 30 días)
Joe Koning
Joe Koning el 24 de Abr. de 2013
I have defined an equation V(x,t), can i store the second derivitive of this equation in a new equation?

Respuesta aceptada

Wayne King
Wayne King el 24 de Abr. de 2013
Editada: Wayne King el 24 de Abr. de 2013
Do you have the Symbolic Toolbox?
syms x t;
v = cos(x)*sin(t);
d2v_dx2 = diff(v,'x',2);
d2v_dx2 has class sym
  2 comentarios
Joe Koning
Joe Koning el 24 de Abr. de 2013
so now d2V_dx2 is a function of x,t? How would i then sub in values of x and t?
Wayne King
Wayne King el 24 de Abr. de 2013
Editada: Wayne King el 24 de Abr. de 2013
use subs() for example, to leave t alone and put in pi for the x variable
subs(d2v_dx2,[x,t],[pi,t])
or to substitute for both variables
subs(d2v_dx2,[x,t],[pi,pi/2])

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by