Filter löschen
Filter löschen

array shifting problem, help

3 Ansichten (letzte 30 Tage)
kelami
kelami am 29 Nov. 2012
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

Akzeptierte Antwort

Matt Fig
Matt Fig am 29 Nov. 2012
Bearbeitet: Matt Fig am 29 Nov. 2012
V = [6 5 4 3 0 1 2 4 0 0 0]
V = [V(2:end-1) 0]
  3 Kommentare
Matt Fig
Matt Fig am 29 Nov. 2012
Oops, sorry. Just modify it:
V = [6 5 4 3 0 1 2 4 0 0 0]
V = [V(2:end) 0]
kelami
kelami am 29 Nov. 2012
thanks a lot

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by