How can I shift a vector numerically to the right (or the left) by adding zeros to the side of the array?

16 Ansichten (letzte 30 Tage)
Supposing I have a vector x=[1 2 3] and I need it to shift it to the right of two integers how can i generate a new vector x1=[0 0 1 2 3]

Akzeptierte Antwort

madhan ravi
madhan ravi am 13 Aug. 2019
x1=[zeros(1,2),x]

Weitere Antworten (0)

Kategorien

Mehr zu Data Types 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