array shifting problem, help

3 次查看(过去 30 天)
kelami
kelami 2012-11-29
hi, l am new at matlab, probably the question is stupid.
l have an array like
[6 5 4 3 0 1 2 4 0 0 0]
l want to shift this array left but the result must be
[5 4 3 0 1 2 4 0 0 0 0]
l dont want to it be circular shifted.
thank you

采纳的回答

Matt Fig
Matt Fig 2012-11-29
编辑:Matt Fig 2012-11-29
V = [6 5 4 3 0 1 2 4 0 0 0]
V = [V(2:end-1) 0]
  3 个评论
Matt Fig
Matt Fig 2012-11-29
Oops, sorry. Just modify it:
V = [6 5 4 3 0 1 2 4 0 0 0]
V = [V(2:end) 0]

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by