Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: symbolic toolbox diff
Date: Sat, 10 Nov 2007 22:34:49 +0000 (UTC)
Organization: Auburn University
Lines: 11
Message-ID: <fh5bm8$84u$1@fred.mathworks.com>
References: <femgeq$3f7$1@ginger.mathworks.com> <femp7j$lo0$1@ginger.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1194734089 8350 172.30.248.38 (10 Nov 2007 22:34:49 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 10 Nov 2007 22:34:49 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1179674
Xref: news.mathworks.com comp.soft-sys.matlab:436933



How do you take the derivative of a variable function of time?
For example

syms t
x = sym('x(t)')
f = 2*x

I want to take the derivative of function f with respect to &#8216;x(t)&#8217;
diff(f, x) or diff(f, 'x(t)')