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

17 vues (au cours des 30 derniers jours)
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]

Réponse acceptée

madhan ravi
madhan ravi le 13 Août 2019
x1=[zeros(1,2),x]

Plus de réponses (0)

Catégories

En savoir plus sur Data Types dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by