Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Create a vector of derivatives, given a vector of values
Date: Thu, 16 Oct 2008 03:47:01 +0000 (UTC)
Organization: Invensys
Lines: 10
Message-ID: <gd6dfl$be8$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1224128821 11720 172.30.248.37 (16 Oct 2008 03:47:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 16 Oct 2008 03:47:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1335821
Xref: news.mathworks.com comp.soft-sys.matlab:495501


Am looking for recommendations about how to create a vector of derivatives given a vector of values. 

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.) 

Could write a loop, I suppose, dT/dt_i = (T_i+1 - T_i)/dt
But there are 20,000 points. 

Is there some vectorized scheme or existing function that I should look into? 

Thanks.