<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157571</link>
    <title>MATLAB Central Newsreader - symbolic toolbox</title>
    <description>Feed for thread: symbolic toolbox</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Fri, 12 Oct 2007 00:51:38 -0400</pubDate>
      <title>symbolic toolbox</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157571#396315</link>
      <author>Steve </author>
      <description>How do you specify what variables are functions of, say&lt;br&gt;
time?  I can't find it in the manual.  So, for example, if I&lt;br&gt;
type&lt;br&gt;
&lt;br&gt;
syms x&lt;br&gt;
f=x&lt;br&gt;
diff(x)&lt;br&gt;
&lt;br&gt;
The solutions is 1.  But what if x is a function of t?  Then&lt;br&gt;
the solution will be d/dt(x).&lt;br&gt;
&lt;br&gt;
Thanks in advance</description>
    </item>
    <item>
      <pubDate>Fri, 12 Oct 2007 03:21:23 -0400</pubDate>
      <title>Re: symbolic toolbox</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157571#396328</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Steve &quot; &amp;lt;steveDEL.bachmeierDEL@yahoo.com&amp;gt; wrote in message &lt;br&gt;
news:femgeq$3f7$1@ginger.mathworks.com...&lt;br&gt;
&amp;gt; How do you specify what variables are functions of, say&lt;br&gt;
&amp;gt; time?  I can't find it in the manual.  So, for example, if I&lt;br&gt;
&amp;gt; type&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; syms x&lt;br&gt;
&amp;gt; f=x&lt;br&gt;
&amp;gt; diff(x)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The solutions is 1.  But what if x is a function of t?  Then&lt;br&gt;
&amp;gt; the solution will be d/dt(x).&lt;br&gt;
&lt;br&gt;
syms t&lt;br&gt;
x = sym('x(t)')&lt;br&gt;
dx = diff(x, t)&lt;br&gt;
dx_tsquared = simplify(subs(dx, x, t^2))&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
    <item>
      <pubDate>Sat, 10 Nov 2007 22:34:49 -0500</pubDate>
      <title>symbolic toolbox diff</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157571#400703</link>
      <author>Dan Marghitu</author>
      <description>How do you take the derivative of a variable function of time?&lt;br&gt;
For example&lt;br&gt;
&lt;br&gt;
syms t&lt;br&gt;
x = sym('x(t)')&lt;br&gt;
f = 2*x&lt;br&gt;
&lt;br&gt;
I want to take the derivative of function f with respect to &amp;#8216;x(t)&amp;#8217;&lt;br&gt;
diff(f, x) or diff(f, 'x(t)')</description>
    </item>
    <item>
      <pubDate>Mon, 12 Nov 2007 15:09:40 -0500</pubDate>
      <title>Re: symbolic toolbox diff</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/157571#400865</link>
      <author>Ben Hinkle</author>
      <description>&quot;Dan Marghitu&quot; &amp;lt;marghitu@auburn.edu&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fh5bm8$84u$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; How do you take the derivative of a variable function of time?&lt;br&gt;
&amp;gt; For example&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; syms t&lt;br&gt;
&amp;gt; x = sym('x(t)')&lt;br&gt;
&amp;gt; f = 2*x&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I want to take the derivative of function f with respect&lt;br&gt;
to &amp;#8216;x(t)&amp;#8217;&lt;br&gt;
&amp;gt; diff(f, x) or diff(f, 'x(t)')&lt;br&gt;
&lt;br&gt;
If you want to sometimes treat x as a function of t and&lt;br&gt;
sometimes not then you can define two variables xt =&lt;br&gt;
sym('x(t)') and x = sym('x') and substitute one for the&lt;br&gt;
other when you want to. For example f = 2*x treats f as a&lt;br&gt;
function of x while ft = 2*xt treats f as a function of t.&lt;br&gt;
Then diff(ft) is 2*diff(x(t),t). If you have an expression g&lt;br&gt;
which involves x then you can use subs(g,x,xt) to replace x&lt;br&gt;
with x(t). Similarly you can replace x(t) with x.&lt;br&gt;
&lt;br&gt;
Hope that helps,&lt;br&gt;
-Ben</description>
    </item>
  </channel>
</rss>

