<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237630</link>
    <title>MATLAB Central Newsreader - Create a vector of derivatives, given a vector of values</title>
    <description>Feed for thread: Create a vector of derivatives, given a vector of values</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>Thu, 16 Oct 2008 03:47:01 -0400</pubDate>
      <title>Create a vector of derivatives, given a vector of values</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237630#605582</link>
      <author>Johan </author>
      <description>Am looking for recommendations about how to create a vector of derivatives given a vector of values. &lt;br&gt;
&lt;br&gt;
In this case, I have an array with temperatures at different times (evenly spaced). I want to create an array of temperature derivatives.  (I anticipate losing a few points at the ends.) &lt;br&gt;
&lt;br&gt;
Could write a loop, I suppose, dT/dt_i = (T_i+1 - T_i)/dt&lt;br&gt;
But there are 20,000 points. &lt;br&gt;
&lt;br&gt;
Is there some vectorized scheme or existing function that I should look into? &lt;br&gt;
&lt;br&gt;
Thanks. </description>
    </item>
    <item>
      <pubDate>Thu, 16 Oct 2008 05:40:04 -0400</pubDate>
      <title>Re: Create a vector of derivatives, given a vector of values</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237630#605595</link>
      <author>Bruno Luong</author>
      <description>&quot;Johan &quot; &amp;lt;robert.mchugh@ips.invensys.com&amp;gt; wrote in message &amp;lt;gd6dfl$be8$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; Is there some vectorized scheme or existing function that I should look into? &lt;br&gt;
&lt;br&gt;
help diff&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Thu, 16 Oct 2008 15:14:02 -0400</pubDate>
      <title>Re: Create a vector of derivatives, given a vector of values</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237630#605714</link>
      <author>Johan </author>
      <description>Thanks.  &quot;help diff&quot; works much better than &quot;help derivative.&quot; :) &lt;br&gt;
&lt;br&gt;
Turns out the data is a little noisy, so estimating the derivative by comparing just two adjacent points produces oscillating derivatives.  &lt;br&gt;
&lt;br&gt;
Are there existing tools to smooth this out?&lt;br&gt;
&lt;br&gt;
Regards. &lt;br&gt;
&lt;br&gt;
&quot;Bruno Luong&quot; &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;gd6k3j$515$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Johan &quot; &amp;lt;robert.mchugh@ips.invensys.com&amp;gt; wrote in message &amp;lt;gd6dfl$be8$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Is there some vectorized scheme or existing function that I should look into? &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; help diff&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bruno</description>
    </item>
    <item>
      <pubDate>Thu, 16 Oct 2008 18:01:03 -0400</pubDate>
      <title>Re: Create a vector of derivatives, given a vector of values</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237630#605751</link>
      <author>Bruno Luong</author>
      <description>&quot;Johan &quot; &amp;lt;robert.mchugh@ips.invensys.com&amp;gt; wrote in message &amp;lt;gd7lnq$h82$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Are there existing tools to smooth this out?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Regards. &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
You might fit (avoid interpolate) the data with a model, then take a derivative of a fitted model. If you don't know the model, then using a universal cubic spline for model could better way than diff.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Thu, 16 Oct 2008 20:24:03 -0400</pubDate>
      <title>Re: Create a vector of derivatives, given a vector of values</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/237630#605776</link>
      <author>John D'Errico</author>
      <description>&quot;Johan &quot; &amp;lt;robert.mchugh@ips.invensys.com&amp;gt; wrote in message &amp;lt;gd6dfl$be8$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Am looking for recommendations about how to create a vector of derivatives given a vector of values. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; In this case, I have an array with temperatures at different times (evenly spaced). I want to create an array of temperature derivatives.  (I anticipate losing a few points at the ends.) &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Could write a loop, I suppose, dT/dt_i = (T_i+1 - T_i)/dt&lt;br&gt;
&amp;gt; But there are 20,000 points. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is there some vectorized scheme or existing function that I should look into? &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks. &lt;br&gt;
&lt;br&gt;
Yes. Just look for a Savitsky-Golay tool. There&lt;br&gt;
are many of them on the file exchange. Here&lt;br&gt;
are a couple of them.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=16997&amp;objectType=FILE&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=16997&amp;objectType=FILE&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4038&amp;objectType=file&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4038&amp;objectType=file&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
John</description>
    </item>
  </channel>
</rss>

