f



shift left, shift right

Hello,
Is there any command to shift left or right a vector ?

thanks for your reply.
0
10/1/2004 9:03:04 AM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

2 Replies
930 Views

Similar Articles

[PageSpeed] 6

patrice:
<SNIP ...Is there any command to shift left or right a vector...

a hint:

     help circshift

us
0
us1 (8051)
10/1/2004 9:51:37 AM
Try these:

4.1 Vectors

To shift and rotate the elements of a vector, use
X([ end 1:end-1 ]); % shift right/down 1 element

X([ end-k+1:end 1:end-k ]); % shift right/down k elements

X([ 2:end 1 ]); % shift left/up 1 element

X([ k+1:end 1:k ]); % shift left/up k elements

Try this link:

 <http://www.cs.huji.ac.il/course/2003/impr/matlab/MatlabTip.pdf>

-TRO

patrice wrote:
>
>
> Hello,
> Is there any command to shift left or right a vector ?
>
> thanks for your reply.
0
tanuj (1)
10/25/2004 5:12:16 AM
Reply: