From: ravi on
Hi ,

I have a vector:

A = [ 2 5 8 9 7 6]

Using A, how can I get

B = [ 2 8 7 ]

and

C = [ 5 9 6 ]

Thanks
Ravi
From: Wayne King on
"ravi " <ravi_071(a)hotmail.com> wrote in message <hpc9f8$7ej$1(a)fred.mathworks.com>...
> Hi ,
>
> I have a vector:
>
> A = [ 2 5 8 9 7 6]
>
> Using A, how can I get
>
> B = [ 2 8 7 ]
>
> and
>
> C = [ 5 9 6 ]
>
> Thanks
> Ravi

Hi Ravi,

A(1:2:end)
A(2:2:end)

You should spend some time reading the MATLAB Getting Started Guide. This elementary operations are covered very well.

Wayne