Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: symbolic toolbox
Date: Thu, 11 Oct 2007 23:21:23 -0400
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <femp7j$lo0$1@ginger.mathworks.com>
References: <femgeq$3f7$1@ginger.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: ginger.mathworks.com 1192159283 22272 144.212.105.187 (12 Oct 2007 03:21:23 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 12 Oct 2007 03:21:23 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
Xref: news.mathworks.com comp.soft-sys.matlab:432552




"Steve " <steveDEL.bachmeierDEL@yahoo.com> wrote in message 
news:femgeq$3f7$1@ginger.mathworks.com...
> How do you specify what variables are functions of, say
> time?  I can't find it in the manual.  So, for example, if I
> type
>
> syms x
> f=x
> diff(x)
>
> The solutions is 1.  But what if x is a function of t?  Then
> the solution will be d/dt(x).

syms t
x = sym('x(t)')
dx = diff(x, t)
dx_tsquared = simplify(subs(dx, x, t^2))

-- 
Steve Lord
slord@mathworks.com