Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Creating a vector from differences in another vector
Date: Mon, 23 Nov 2009 12:26:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <hedv0r$7ei$1@fred.mathworks.com>
References: <hedrvc$kqb$1@fred.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 1258979163 7634 172.30.248.38 (23 Nov 2009 12:26:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 23 Nov 2009 12:26:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2101682
Xref: news.mathworks.com comp.soft-sys.matlab:587157

"Ulrik Nash" <uwn@sam.sdu.dk> wrote in message <hedrvc$kqb$1@fred.mathworks.com>...
> Hi,
> 
> Suppose I have a vector A = [0 1 2 3 4 5]
> 
> now I wish to create another vector B from A 
> 
> where B = [0-1 1-2 2-3 3-4 4-5]
> 
> How would I do that using MatLab?
> 
> Regards,
> 
> Ulrik.

Hi Ulrik,

help diff

hth 
kinor