|
"Ulrik Nash" <uwn@sam.sdu.dk> wrote in message <heecb1$85f$1@fred.mathworks.com>...
> "kinor " <kinor.removethiswithdot@gmx.de> wrote in message <hedv0r$7ei$1@fred.mathworks.com>...
> > "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
>
> Hi Kinor,
>
> I am not sure if I went in the right direction. Can you please elaborate?
>
> Regards,
>
> Ulrik.
Hi Ulrik,
help diff gives you the information,
for your situation -diff(A) should do it
Best,
Kinor
|