How to simply differentiate equations?

I have defined an equation V(x,t), can i store the second derivitive of this equation in a new equation?

 채택된 답변

Wayne King
Wayne King 2013년 4월 24일
편집: Wayne King 2013년 4월 24일

0 개 추천

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

Joe Koning
Joe Koning 2013년 4월 24일
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 2013년 4월 24일
편집: Wayne King 2013년 4월 24일
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])

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by